Update docker

This commit is contained in:
Ruben van de Ven 2020-12-16 08:49:12 +01:00
parent 07c4f9e899
commit 6ee11bc076
2 changed files with 35 additions and 34 deletions

View file

@ -19,7 +19,8 @@ CMD ["npm", "start"]
FROM development as build
ENV NODE_ENV production
RUN npm run build
RUN npm run build:server
RUN npm run build:client
FROM base as production
ENV NODE_ENV=production

View file

@ -13,39 +13,39 @@ services:
# image: index.docker.io/catarak/p5.js-web-editor:latest
# uncomment the following lines if you don't want export all of the variables
# defined in your .env file for testing
# env_file:
# - "$PWD/.env.production"
environment:
- API_URL
- AWS_ACCESS_KEY
- AWS_REGION
- AWS_SECRET_KEY
- CORS_ALLOW_LOCALHOST
- EMAIL_SENDER
- EMAIL_VERIFY_SECRET_TOKEN
- EXAMPLE_USERNAME
- EXAMPLE_USER_EMAIL
- EXAMPLE_USER_PASSWORD
- GG_EXAMPLES_USERNAME
- GG_EXAMPLES_EMAIL
- GG_EXAMPLES_PASS
- ML5_EXAMPLES_USERNAME
- ML5_EXAMPLES_EMAIL
- ML5_EXAMPLES_PASS
- GITHUB_ID
- GITHUB_SECRET
- GOOGLE_ID
- GOOGLE_SECRET
- MAILGUN_DOMAIN
- MAILGUN_KEY
- MONGO_URL
- PORT
- S3_BUCKET
- S3_BUCKET_URL_BASE
- SESSION_SECRET
- UI_ACCESS_TOKEN_ENABLED
- UPLOAD_LIMIT
- MOBILE_ENABLED
env_file:
- "$PWD/.env.production"
# environment:
# - API_URL
# - AWS_ACCESS_KEY
# - AWS_REGION
# - AWS_SECRET_KEY
# - CORS_ALLOW_LOCALHOST
# - EMAIL_SENDER
# - EMAIL_VERIFY_SECRET_TOKEN
# - EXAMPLE_USERNAME
# - EXAMPLE_USER_EMAIL
# - EXAMPLE_USER_PASSWORD
# - GG_EXAMPLES_USERNAME
# - GG_EXAMPLES_EMAIL
# - GG_EXAMPLES_PASS
# - ML5_EXAMPLES_USERNAME
# - ML5_EXAMPLES_EMAIL
# - ML5_EXAMPLES_PASS
# - GITHUB_ID
# - GITHUB_SECRET
# - GOOGLE_ID
# - GOOGLE_SECRET
# - MAILGUN_DOMAIN
# - MAILGUN_KEY
# - MONGO_URL
# - PORT
# - S3_BUCKET
# - S3_BUCKET_URL_BASE
# - SESSION_SECRET
# - UI_ACCESS_TOKEN_ENABLED
# - UPLOAD_LIMIT
# - MOBILE_ENABLED
# you can either set this in your .env or as an environment variables
# or here YOU CHOOSE