-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yaml
82 lines (77 loc) · 2.54 KB
/
docker-compose.yaml
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
version: "3.9"
services:
api:
image: capy-cloud-backend.api:latest
container_name: capy-cloud-backend.api
restart: "on-failure"
env_file:
- ".env"
build:
context: .
expose:
- "5000"
ports:
- "5000:5000"
depends_on:
postgres:
condition: service_healthy
storage-daemon:
condition: service_started
networks:
- capy-cloud-backend.postgres.network
- capy-cloud-backend.storage-daemon.network
volumes:
- capy-cloud-backend.api.data:/usr/src/app/${UPLOAD_DIR:?}:rw
- capy-cloud-backend.storage-daemon.bin:/usr/local/bin/ton-storage:ro
- capy-cloud-backend.storage-daemon.data:/data:rw
postgres:
container_name: capy-cloud-backend.postgres
image: "postgres:15-alpine"
hostname: capy-cloud-backend.postgres
restart: unless-stopped
expose:
- "5432"
ports:
- "127.0.0.1:${POSTGRES_PORT:-5432}:5432"
networks:
- capy-cloud-backend.postgres.network
environment:
POSTGRES_PASSWORD: $POSTGRES_PASSWORD
POSTGRES_USER: ${POSTGRES_USER:-$USER}
POSTGRES_DB: ${POSTGRES_DB:-$USER}
volumes:
- capy-cloud-backend.postgres.data:/var/lib/postgresql/users:rw
healthcheck:
test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"]
interval: 10s
timeout: 60s
retries: 5
start_period: 10s
storage-daemon:
image: "meamone/ton-storage-daemon:latest"
container_name: capy-cloud-backend.storage-daemon
restart: "unless-stopped"
environment:
TON_STORAGE_ADNL_PORT: ${TON_STORAGE_ADNL_PORT:-3333}
TON_STORAGE_CONTROL_PORT: ${TON_STORAGE_CONTROL_PORT:-5555}
TON_STORAGE_VERBOSITY_LEVEL: ${TON_STORAGE_VERBOSITY_LEVEL:-3}
TON_STORAGE_GLOBAL_CONFIG: ${TON_STORAGE_GLOBAL_CONFIG:?}
TON_STORAGE_DATABASE_NAME: ${TON_STORAGE_DATABASE_NAME:-ton-storage}
TON_PUBLIC_IP: ${TON_PUBLIC_IP:?}
networks:
- capy-cloud-backend.storage-daemon.network
volumes:
- ./global_configs:/usr/src/app/global_configs:ro
- capy-cloud-backend.api.data:/usr/src/app/${UPLOAD_DIR}:ro
- capy-cloud-backend.storage-daemon.data:/data:rw
- capy-cloud-backend.storage-daemon.bin:/usr/local/bin:ro
volumes:
capy-cloud-backend.api.data: {}
capy-cloud-backend.postgres.data: {}
capy-cloud-backend.storage-daemon.data: {}
capy-cloud-backend.storage-daemon.bin: {}
networks:
capy-cloud-backend.api.network:
external: true
capy-cloud-backend.postgres.network: {}
capy-cloud-backend.storage-daemon.network: {}