-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
98 lines (91 loc) · 2.04 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# Use this only for production
# For development - see Makefile, "up" target
version: '3.9'
services:
gateway:
build:
context: gateway
dockerfile: Dockerfile
depends_on:
- api-gateway
- frontend
expose:
- 80
networks:
- vps-traefik
- default
labels:
- "traefik.docker.network=vps-traefik"
- "traefik.enable=true"
- "traefik.http.routers.natai.rule=Host(`natai.app`)"
- "traefik.http.routers.natai.entrypoints=websecure"
- "traefik.http.routers.natai.tls.certresolver=myresolver"
# support for www.natai.app
- "traefik.http.routers.www-natai.rule=Host(`www.natai.app`)"
- "traefik.http.routers.www-natai.entrypoints=websecure"
- "traefik.http.routers.www-natai.tls.certresolver=myresolver"
api-gateway:
build:
context: api
dockerfile: docker/nginx/Dockerfile
env_file:
- .env
volumes:
- ./api:/app
depends_on:
- db
- api-php-fpm
networks:
- default
api-php-fpm:
image: natai/api-php-fpm:latest
build:
context: api
dockerfile: docker/php/Dockerfile
stdin_open: true
tty: true
volumes:
- ./api:/app
networks:
- default
api-queue:
image: natai/api-php-fpm:latest
restart: unless-stopped
build:
context: api
dockerfile: docker/php/Dockerfile
volumes:
- ./api:/app
command: sh -c "bin/console messenger:consume async --limit=10"
tty: true
depends_on:
- db
networks:
- default
frontend:
image: natai/frontend:latest
build:
context: frontend
dockerfile: docker/Dockerfile
env_file:
- frontend/.env.prod.local
restart: always
networks:
- default
db:
image: postgres:14-alpine
env_file:
- .env
volumes:
- db-data:/var/lib/postgresql/data
- /home/deploy/natai/backup:/tmp/backup
ports:
- "35432:5432"
networks:
- default
volumes:
db-data:
networks:
default:
vps-traefik:
external: true