spot2gether/docker-compose.yml.example

38 lines
729 B
Plaintext
Raw Permalink Normal View History

2022-09-30 18:59:08 +00:00
version: '3'
services:
2022-10-20 22:14:58 +00:00
mongodb:
image: mongo:5.0
2022-09-30 18:59:08 +00:00
environment:
2022-10-20 22:14:58 +00:00
- MONGO_INITDB_ROOT_USERNAME=spot2gether
- MONGO_INITDB_ROOT_PASSWORD=spot2gether
2022-09-30 18:59:08 +00:00
backend:
image: node:alpine
restart: always
expose:
- 3000
volumes:
- ./backend/:/home/node/app/backend/
- ./helpers/:/home/node/app/helpers/
working_dir: /home/node/app/backend
environment:
- NODE_ENV=production
command: sh -c 'npm i && nodejs index.mjs'
links:
2022-10-20 22:14:58 +00:00
- mongodb
2022-09-30 18:59:08 +00:00
depends_on:
2022-10-20 22:14:58 +00:00
- mongodb
2022-09-30 18:59:08 +00:00
frontend:
2022-10-20 21:59:00 +00:00
build:
context: ./frontend
dockerfile: ".Dockerfile"
2022-09-30 18:59:08 +00:00
restart: always
ports:
- "8080:8080"
links:
- backend
depends_on:
- backend