-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.local.yml
101 lines (94 loc) · 1.89 KB
/
docker-compose.local.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
99
100
101
# Use this only for local testing
version: '3.9'
services:
gateway:
build:
context: gateway
dockerfile: Dockerfile
depends_on:
- api-gateway
- frontend
expose:
- 80
networks:
- vps-traefik
- default
labels:
- "traefik.enable=true"
- "traefik.http.routers.gateway-natai.rule=Host(`natai.docker.localhost`)"
- "traefik.http.services.gateway-natai.loadbalancer.server.port=80"
api-gateway:
build:
context: api
dockerfile: docker/nginx/Dockerfile
env_file:
- .env
volumes:
- ./api:/app
depends_on:
- db
- api-php-fpm
networks:
- default
labels:
- "traefik.enable=false"
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
labels:
- "traefik.enable=false"
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
labels:
- "traefik.enable=false"
frontend:
image: natai/frontend:latest
build:
context: frontend
dockerfile: docker/Dockerfile
env_file:
- frontend/.env.prod.local
restart: always
networks:
- default
labels:
- "traefik.enable=false"
db:
image: postgres:14-alpine
env_file:
- .env
volumes:
- db-data:/var/lib/postgresql/data
- /tmp/backup:/tmp/backup
ports:
- "35432:5432"
networks:
- default
labels:
- "traefik.enable=false"
volumes:
db-data:
networks:
default:
vps-traefik:
external: true