-
Notifications
You must be signed in to change notification settings - Fork 108
/
Copy pathdocker-compose.yml
146 lines (125 loc) · 3.02 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
x-common-service: &common-service
env_file:
- .env
depends_on:
- db
- redis
x-web-common: &web-common
<<: *common-service
labels:
- 'traefik.enable=true'
- 'traefik.http.routers.web.rule=Host(`app.latitude.localhost`)'
- 'traefik.http.services.web.loadbalancer.server.port=8080'
depends_on:
- db
- redis
- traefik
x-gateway-common: &gateway-common
<<: *common-service
labels:
- 'traefik.enable=true'
- 'traefik.http.routers.gateway.rule=Host(`gateway.latitude.localhost`)'
- 'traefik.http.services.gateway.loadbalancer.server.port=8081'
x-websockets-common: &websockets-common
<<: *common-service
labels:
- 'traefik.enable=true'
- 'traefik.http.routers.websockets.rule=Host(`ws.latitude.localhost`)'
- 'traefik.http.services.websockets.loadbalancer.server.port=4002'
services:
mailpit:
image: axllent/mailpit
ports:
- 8025:8025
- 1025:1025
profiles:
- development
traefik:
image: traefik:v2.10
command:
- '--api.insecure=true'
- '--providers.docker=true'
- '--providers.docker.exposedbydefault=false'
- '--entrypoints.web.address=:80'
ports:
- '80:80'
- '8090:8080'
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
db:
image: postgres:15.8
ports:
- '5432:5432'
env_file:
- .env
volumes:
- ./docker/init-db.sh:/docker-entrypoint-initdb.d/init-db.sh
- ./docker/pgdata:/var/lib/postgresql/data
redis:
image: redis
ports:
- '6379:6379'
web-local:
<<: *web-common
image: latitude/web:latest
build:
context: .
dockerfile: apps/web/docker/Dockerfile
profiles:
- local
web:
<<: *web-common
image: ghcr.io/latitude-dev/web:latest
platform: linux/amd64
migrations-local:
<<: *common-service
image: latitude/migrations:latest
build:
context: .
dockerfile: packages/core/docker/Dockerfile
depends_on:
- db
profiles:
- local
migrations:
<<: *common-service
image: ghcr.io/latitude-dev/migrations:latest
platform: linux/amd64
depends_on:
- db
gateway-local:
<<: *gateway-common
image: latitude/gateway:latest
build:
context: .
dockerfile: apps/gateway/docker/Dockerfile
profiles:
- local
gateway:
<<: *gateway-common
image: ghcr.io/latitude-dev/gateway:latest
platform: linux/amd64
workers-local:
<<: *common-service
image: latitude/workers:latest
build:
context: .
dockerfile: apps/workers/docker/Dockerfile
profiles:
- local
workers:
<<: *common-service
image: ghcr.io/latitude-dev/workers:latest
platform: linux/amd64
websockets-local:
<<: *websockets-common
image: latitude/websockets:latest
build:
context: .
dockerfile: apps/websockets/docker/Dockerfile
profiles:
- local
websockets:
<<: *websockets-common
image: ghcr.io/latitude-dev/websockets:latest
platform: linux/amd64