-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.prod.yml
74 lines (74 loc) · 1.4 KB
/
docker-compose.prod.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
74
version: "3.9"
services:
builder:
build:
context: .
dockerfile: .docker/Dockerfile.builder
args:
APP_URL: ${APP_URL}
image: builder:latest
container_name: builder
nginx:
build:
context: .
dockerfile: .docker/nginx/Dockerfile.nginx
container_name: nginx
ports:
- "80:80"
- "443:443"
restart: always
depends_on:
- app
- db
- supervisor
networks:
- api_network
volumes:
- nginx:/etc/nginx/http.d
- certs:/etc/letsencrypt
app:
build:
context: .
dockerfile: .docker/Dockerfile.prod
container_name: app
env_file:
- .env
tty: true
networks:
- api_network
volumes:
- storage:/var/www/html/storage
depends_on:
- builder
- db
supervisor:
build:
context: .
dockerfile: .docker/supervisor/Dockerfile.supervisor
volumes:
- storage:/var/www/html/storage
networks:
- api_network
env_file:
- .env
db:
image: postgres:15.3-alpine3.18
restart: always
environment:
- POSTGRES_USER=${DB_USERNAME}
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=${DB_DATABASE}
volumes:
- dbData:/var/lib/postgresql/data
networks:
- api_network
# Docker Networks
networks:
api_network:
driver: bridge
# Volumes
volumes:
dbData:
storage:
nginx:
certs: