-
Notifications
You must be signed in to change notification settings - Fork 24
/
docker-compose.api.yml
120 lines (114 loc) · 2.76 KB
/
docker-compose.api.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
services:
redis:
container_name: blackbird-redis
command:
- redis-server
- "--appendonly"
- "yes"
- "--requirepass ${REDIS_PASSWORD}"
image: redis
restart: unless-stopped
healthcheck:
test: ["CMD", "redis-cli", "--raw", "incr", "ping"]
interval: 10s
timeout: 5s
retries: 5
networks: [api-network]
ports:
- "${REDIS_HOST_PORT:-6379}:${REDIS_PORT:-6379}"
api:
container_name: blackbird-api
env_file:
- .env
build:
context: .
target: api
environment:
- NODE_ENV=${NODE_ENV:-development}
depends_on:
- redis
- pgsql
- minio
networks: [api-network]
ports:
- "${APP_HOST_PORT:-3000}:3000"
restart: unless-stopped
volumes:
- ${MEDIA_LOCATION:-./data/media/}incoming:/data/media/incoming
- ${MEDIA_LOCATION:-./data/media/}downloadCache:/data/media/downloadCache
develop:
watch:
- action: sync+restart
path: ./src
target: /var/www/api/src
- action: sync+restart
path: ./emails
target: /var/www/api/emails
- action: rebuild
path: ./prisma
target: /var/www/api/prisma
- action: rebuild
path: package.json
background:
container_name: blackbird-background
env_file:
- .env
build:
context: .
target: background
environment:
- NODE_ENV=${NODE_ENV:-development}
depends_on:
- redis
- pgsql
- api
- minio
restart: unless-stopped
networks: [api-network]
volumes:
- ${MEDIA_LOCATION:-./data/media/}processing:/data/media/processing
develop:
watch:
- action: sync+restart
path: ./src
target: /var/www/api/src
- action: sync+restart
path: ./emails
target: /var/www/api/emails
- action: rebuild
path: ./prisma
target: /var/www/api/prisma
- action: rebuild
path: package.json
minio:
container_name: blackbird-minio
image: minio/minio
networks: [api-network]
ports:
- "9000:9000" # API Port
- "9001:9001" # Web UI Port
volumes:
- minio_storage:/data
env_file: .env
command: server --console-address ":9001" /data
pgsql:
container_name: blackbird-pgsql
image: postgres:14-alpine
env_file:
- .env
volumes:
- ./data/pgsql:/var/lib/postgresql/data
- ./data/pgsql_backups:/backups
healthcheck:
test: ["CMD", "pg_isready", "-U", "$POSTGRES_USER"]
interval: 10s
timeout: 5s
retries: 5
networks: [api-network]
ports:
- "${POSTGRES_LOCAL_MACHINE_PORT:-5432}:5432"
networks:
api-network:
driver: bridge
volumes:
minio_storage: {}