-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
65 lines (62 loc) · 1.81 KB
/
Copy pathdocker-compose.yml
File metadata and controls
65 lines (62 loc) · 1.81 KB
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
services:
postgres:
image: pgvector/pgvector:pg16
container_name: hypertrade-postgres
restart: unless-stopped
environment:
POSTGRES_DB: ${POSTGRES_DB:-hypertrade}
POSTGRES_USER: ${POSTGRES_USER:-hypertrade}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-hypertrade}
volumes:
- /opt/hypertrade/data/postgres:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-hypertrade} -d ${POSTGRES_DB:-hypertrade}"]
interval: 10s
timeout: 5s
retries: 10
networks:
- hypertrade
api:
build:
context: .
dockerfile: backend/Dockerfile
container_name: hypertrade-api
restart: unless-stopped
env_file:
- .env
extra_hosts:
- "host.docker.internal:host-gateway"
environment:
DATABASE_URL: postgresql+psycopg://${POSTGRES_USER:-hypertrade}:${POSTGRES_PASSWORD:-hypertrade}@postgres:5432/${POSTGRES_DB:-hypertrade}
ports:
- "127.0.0.1:3334:3334"
volumes:
- ${BITPRO_HOST_DATA_DIR:-/opt/bitpro/data}:/bitpro-data:ro
depends_on:
postgres:
condition: service_healthy
networks:
- hypertrade
worker:
build:
context: .
dockerfile: backend/Dockerfile
container_name: hypertrade-worker
restart: unless-stopped
command: ["python", "-m", "hypertrade.worker"]
env_file:
- .env
extra_hosts:
- "host.docker.internal:host-gateway"
environment:
DATABASE_URL: postgresql+psycopg://${POSTGRES_USER:-hypertrade}:${POSTGRES_PASSWORD:-hypertrade}@postgres:5432/${POSTGRES_DB:-hypertrade}
volumes:
- ${BITPRO_HOST_DATA_DIR:-/opt/bitpro/data}:/bitpro-data:ro
depends_on:
postgres:
condition: service_healthy
networks:
- hypertrade
networks:
hypertrade:
name: hypertrade