-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
58 lines (58 loc) · 1.12 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
services:
api:
build:
dockerfile: Dockerfile-api
container_name: images-api
hostname: api
volumes:
- shared-data:/tmp/image-uploads
environment:
- MESSAGING_SERVER_URL=nats://nats:4222
- SPRING_R2DBC_HOST=postgres
ports:
- 8080:8080
depends_on:
- broker
- db
- worker
worker:
build:
dockerfile: Dockerfile-worker
container_name: images-worker
hostname: worker
volumes:
- shared-data:/tmp/image-uploads
environment:
- MESSAGING_SERVER_URL=nats://nats:4222
- SPRING_R2DBC_HOST=postgres
ports:
- 8081:8081
depends_on:
- broker
- db
broker:
image: nats:latest
container_name: images-nats
hostname: nats
env_file:
- .env
ports:
- "4222:4222"
- "6222:6222"
- "8222:8222"
restart: always
db:
image: postgres:15.0-alpine
container_name: images-postgres
hostname: postgres
env_file:
- .env
ports:
- 5432:5432
restart: always
volumes:
- db:/var/lib/postgresql/data
volumes:
shared-data:
db:
driver: local