-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
40 lines (40 loc) · 1017 Bytes
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
services:
frontend:
image: nginx:1.20-alpine
build:
context: ./frontend/
volumes:
- ./frontend/build/:/usr/share/nginx/html
- ./frontend/nginx.conf:/etc/nginx/nginx.conf:ro
container_name: taivuttaja-frontend
mongo:
image: mongo
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: example
MONGO_INITDB_DATABASE: the_database
container_name: taivuttaja-mongodb
volumes:
- ./backend/mongo/:/docker-entrypoint-initdb.d/
backend:
build:
context: ./backend/
volumes:
- ./backend/:/usr/src/app
container_name: taivuttaja-backend
extra_hosts:
- "host.docker.internal:host-gateway"
command:
- /bin/sh
- -c
- npm install && npm run tsc && npm start
nginx:
image: nginx:1.20.1
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
ports:
- 80:80
container_name: taivuttaja-reverse-proxy
depends_on:
- frontend
- backend