-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
51 lines (51 loc) · 1.12 KB
/
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
41
42
43
44
45
46
47
48
49
50
51
services:
db:
container_name: postgres-fullstack
image: postgres:14.0-alpine
restart: always
environment:
- POSTGRES_USER=${DB_USERNAME}
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=${DB_NAME}
volumes:
- postgres-data:/var/lib/postgresql/data
ports:
- ${DB_PORT}:${DB_PORT}
backend:
container_name: backend-fullstack
volumes:
- pgdata:/pgdata
build:
context: ./
dockerfile: Dockerfile.backend
depends_on:
- db
restart: unless-stopped
ports:
- '${PORT}:3002'
environment:
- PORT=${PORT}
- HOST=${HOST}
- DB_HOST=db
- DB_CONNECTION=${DB_CONNECTION}
- DB_USERNAME=${DB_USERNAME}
- DB_PASSWORD=${DB_PASSWORD}
- DB_NAME=${DB_NAME}
- DB_PORT=${DB_PORT}
nginx:
build:
context: .
dockerfile: Dockerfile.nginx
container_name: nginx-fullstack
ports:
- '80:80'
- '443:443'
volumes:
- /etc/ssl:/etc/nginx/ssl:ro
- nginx_cache:/var/cache/nginx
user: 'nginxuser'
restart: always
volumes:
postgres-data:
pgdata:
nginx_cache: