-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
64 lines (61 loc) · 1.72 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
services:
postgres:
image: postgres:16-alpine
container_name: postgres
restart: unless-stopped
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-meteoriscool}
POSTGRES_DB: ${POSTGRES_DB:-postgres}
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U postgres -d ${POSTGRES_DB:-postgres}']
interval: 10s
timeout: 5s
retries: 3
start_period: 30s
ports:
- '127.0.0.1:5432:5432'
cobalt-api:
image: ghcr.io/imputnet/cobalt:10
container_name: cobalt-api
init: true
read_only: true
restart: unless-stopped
ports:
- '127.0.0.1:9000:9000'
environment:
API_URL: 'http://cobalt-api:9000'
labels:
- com.centurylinklabs.watchtower.scope=cobalt
healthcheck:
test: ['CMD', 'wget', '--spider', 'http://127.0.0.1:9000']
interval: 5s
timeout: 10s
retries: 10
cobalt-watchtower:
image: ghcr.io/containrrr/watchtower
container_name: cobalt-watchtower
restart: unless-stopped
command: --cleanup --scope cobalt --interval 900 --include-restarting
volumes:
- /var/run/docker.sock:/var/run/docker.sock
app:
build:
context: .
target: release
container_name: app
restart: unless-stopped
environment:
DATABASE_URL: postgresql://postgres:${POSTGRES_PASSWORD:-meteoriscool}@postgres:5432/${POSTGRES_DB:-postgres}?schema=public
COBALT_API_URL: http://cobalt-api:9000
NODE_ENV: production
DISCORD_TOKEN: ${DISCORD_TOKEN}
depends_on:
postgres:
condition: service_healthy
cobalt-api:
condition: service_healthy
volumes:
postgres_data: