-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
73 lines (73 loc) · 1.84 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
version: "3"
services:
app:
build:
context: .
dockerfile: Dockerfile
command: npm run start:prod
container_name: app
restart: unless-stopped
env_file:
- .env
ports:
- "${APP_PORT}:${APP_PORT}"
networks:
- intranet
depends_on:
- postgres
- redis
nginx:
image: nginx:1.21-alpine
container_name: nginx
restart: unless-stopped
ports:
- 80:80
- 443:443
volumes:
- ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./docker/certbot/www:/var/www/certbot:ro
- ./docker/certbot/conf:/etc/nginx/ssl:ro
networks:
- intranet
depends_on:
- app
- certbot
certbot:
image: certbot/certbot:v1.25.0
container_name: certbot
volumes:
- ./docker/certbot/www:/var/www/certbot:rw
- ./docker/certbot/conf:/etc/letsencrypt:rw
postgres:
image: postgres:14-alpine
container_name: postgres
restart: unless-stopped
env_file:
- .env
environment:
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASS}
POSTGRES_DB: ${DB_NAME}
PG_DATA: /var/lib/postgresql/data
ports:
- "${DB_PORT}:${DB_PORT}"
volumes:
- pgdata:/var/lib/postgresql/data:rw
networks:
- intranet
redis:
image: redis:6-alpine
container_name: redis
restart: unless-stopped
env_file:
- .env
ports:
- "${REDIS_PORT}:${REDIS_PORT}"
networks:
- intranet
networks:
intranet:
name: intranet
driver: bridge
volumes:
pgdata: