-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
41 lines (41 loc) · 878 Bytes
/
docker-compose.yml
File metadata and controls
41 lines (41 loc) · 878 Bytes
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
41
version: '3'
volumes:
data:
networks:
front:
back:
services:
frontend:
image: nginx:1.21.6-alpine
volumes:
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf
ports:
- '${NGINX_PORT}:${NGINX_PORT}'
networks:
- front
depends_on:
- api
api:
build: app
volumes:
- ./app:/app
working_dir: /app
command: bash -c "npm i && npm start"
networks:
- front
- back
environment:
DB_HOST: '${DB_HOST}'
depends_on:
- db
db:
image: postgres:14.1-alpine
volumes:
- data:/var/lib/postgresql/data
restart: always
networks:
- back
environment:
POSTGRES_DB: '${POSTGRES_DB}'
POSTGRES_USER: '${POSTGRES_USER}'
POSTGRES_PASSWORD: '${POSTGRES_PASSWORD}'