version: '3.4' services: mongo: image: mongo:3.4 volumes: - dbdata:/data/db - "$PWD/mongo/:/docker-entrypoint-initdb.d/" expose: - "27017" ports: - '27017:27017' # restart: always # env_file: # - "$PWD/.env" environment: - MONGO_INITDB_ROOT_USERNAME - MONGO_INITDB_ROOT_PASSWORD - MONGO_INITDB_DATABASE - MONGO_RW_USERNAME - MONGO_RW_PASSWORD nginx: image: nginx:1.13 volumes: - "$PWD/nginx/alpha.editor.p5js.org.conf:/etc/nginx/conf.d/default.conf" ports: - '80:80' depends_on: - app links: - app app: # build: # context: . # dockerfile: Dockerfile # target: production # args: # - API_URL # - NODE_ENV # - S3_BUCKET # - AWS_REGION # - S3_BUCKET_URL_BASE # - FORCE_TO_HTTPS image: index.docker.io/catarak/p5.js-web-editor:latest env_file: - "$PWD/.env" environment: - API_URL - MONGO_URL - MONGO_NAME - PORT - SESSION_SECRET - AWS_ACCESS_KEY - AWS_SECRET_KEY - S3_BUCKET - AWS_REGION - GITHUB_ID - GITHUB_SECRET - MAILGUN_DOMAIN - MAILGUN_KEY - EMAIL_SENDER - EMAIL_VERIFY_SECRET_TOKEN - S3_BUCKET_URL_BASE - GG_EXAMPLES_USERNAME - GG_EXAMPLES_PASS - GG_EXAMPLES_EMAIL - GOOGLE_ID - GOOGLE_SECRET - EXAMPLE_USER_EMAIL - EXAMPLE_USER_PASSWORD - MONGO_INITDB_ROOT_USERNAME - MONGO_INITDB_ROOT_PASSWORD - MONGO_INITDB_DATABASE - MONGO_RW_USERNAME - MONGO_RW_PASSWORD - MONGO_HOSTNAME - MONGO_PORT - FORCE_TO_HTTPS volumes: - .:/opt/node/app - /opt/node/app/node_modules ports: - '8000:8000' # - '443:443' depends_on: - mongo volumes: dbdata: