Spaces:
Paused
Paused
GPTfree api
commited on
Create Dockerfile
Browse files- Dockerfile +34 -0
Dockerfile
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use an official Node.js image as the base
|
| 2 |
+
FROM node:18
|
| 3 |
+
|
| 4 |
+
# Set the working directory in the container
|
| 5 |
+
WORKDIR /app
|
| 6 |
+
|
| 7 |
+
# Install Bun (if needed)
|
| 8 |
+
RUN curl -fsSL https://bun.sh/install | bash && \
|
| 9 |
+
export PATH="/root/.bun/bin:$PATH"
|
| 10 |
+
|
| 11 |
+
# Clone the repository (default branch is main)
|
| 12 |
+
RUN git clone https://github.com/UseInterstellar/Interstellar.git .
|
| 13 |
+
|
| 14 |
+
# For Ad-Free Deployment, uncomment the following two lines and comment the above clone command
|
| 15 |
+
# RUN git clone --branch Ad-Free https://github.com/UseInterstellar/Interstellar.git .
|
| 16 |
+
|
| 17 |
+
# Install dependencies based on the package manager you want to use
|
| 18 |
+
# Uncomment one of the following blocks depending on your package manager
|
| 19 |
+
|
| 20 |
+
# For Bun
|
| 21 |
+
# RUN bun i
|
| 22 |
+
# CMD ["bun", "start"]
|
| 23 |
+
|
| 24 |
+
# For pnpm
|
| 25 |
+
# RUN npm install -g pnpm && pnpm i
|
| 26 |
+
# CMD ["pnpm", "start"]
|
| 27 |
+
|
| 28 |
+
# For npm
|
| 29 |
+
RUN npm i
|
| 30 |
+
CMD ["npm", "run", "start"]
|
| 31 |
+
|
| 32 |
+
# Add update instructions as a comment for manual execution
|
| 33 |
+
# To update the repository later:
|
| 34 |
+
# cd /app && git pull --force --allow-unrelated-histories
|