adjust docker container
This commit is contained in:
parent
1e63ad5b52
commit
0b8be6c6a0
@ -6,7 +6,6 @@ RUN mkdir -p /usr/src/app
|
|||||||
# Set environment variables
|
# Set environment variables
|
||||||
ENV PORT 3000
|
ENV PORT 3000
|
||||||
ENV NEXT_TELEMETRY_DISABLED=1
|
ENV NEXT_TELEMETRY_DISABLED=1
|
||||||
ENV RUNTIME_ENVIRONMENT=development
|
|
||||||
ENV OAUTH_CLIENT_ID=client_id
|
ENV OAUTH_CLIENT_ID=client_id
|
||||||
ENV OAUTH_CLIENT_SECRET=client_secret
|
ENV OAUTH_CLIENT_SECRET=client_secret
|
||||||
|
|
||||||
@ -25,7 +24,7 @@ RUN pnpm install
|
|||||||
# Copy the rest of the application code
|
# Copy the rest of the application code
|
||||||
COPY . /usr/src/app
|
COPY . /usr/src/app
|
||||||
|
|
||||||
# Initialize Database
|
# Initialize Database, if it not already exists
|
||||||
RUN pnpm run db
|
RUN pnpm run db
|
||||||
|
|
||||||
# Build the application
|
# Build the application
|
||||||
@ -34,4 +33,4 @@ RUN pnpm run build
|
|||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|
||||||
# Start the application
|
# Start the application
|
||||||
CMD ["pnpm", "start"]
|
CMD ["/bin/sh", "-c", "if [ ! -f ./db/sqlite.db ]; then pnpm db; fi && pnpm start"]
|
@ -6,8 +6,7 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- "3000:3000"
|
- "3000:3000"
|
||||||
environment:
|
environment:
|
||||||
NODE_ENV: development
|
|
||||||
OAUTH_CLIENT_ID: 521f431132202fd5225d
|
OAUTH_CLIENT_ID: 521f431132202fd5225d
|
||||||
OAUTH_CLIENT_SECRET: 12084446d467ad4bce75ace54d881a8287321d32
|
OAUTH_CLIENT_SECRET: 12084446d467ad4bce75ace54d881a8287321d32
|
||||||
#volumes:
|
volumes:
|
||||||
# - ./docker-test/db:/usr/src/app/db
|
- /tmp/docker-test-db:/usr/src/app/db
|
||||||
|
Loading…
x
Reference in New Issue
Block a user