-
Notifications
You must be signed in to change notification settings - Fork 261
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
71 lines (66 loc) · 1.88 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
71 lines (66 loc) · 1.88 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
66
67
68
69
70
71
version: '3.8'
services:
postgres:
image: postgres:15-alpine
container_name: liquifact-postgres-dev
restart: unless-stopped
environment:
POSTGRES_DB: liquifact
POSTGRES_USER: liquifact_user
POSTGRES_PASSWORD: liquifact_dev_password
POSTGRES_INITDB_ARGS: "--encoding=UTF-8 --lc-collate=C --lc-ctype=C"
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./scripts/init-db.sql:/docker-entrypoint-initdb.d/init-db.sql:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U liquifact_user -d liquifact"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
networks:
- liquifact-network
redis:
image: redis:7-alpine
container_name: liquifact-redis-dev
restart: unless-stopped
ports:
- "6379:6379"
command: redis-server --appendonly yes --maxmemory 256mb --maxmemory-policy allkeys-lru
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 3
networks:
- liquifact-network
volumes:
postgres_data:
driver: local
redis_data:
driver: local
# Uncomment below to add the API service with healthcheck:
# api:
# build: .
# ports:
# - "3001:3001"
# environment:
# NODE_ENV: development
# DATABASE_URL: postgres://liquifact_user:liquifact_dev_password@postgres:5432/liquifact
# SOROBAN_RPC_URL: https://soroban-testnet.stellar.org
# healthcheck:
# test: ["CMD", "node", "-e", "fetch('http://localhost:3001/readyz').then(r => r.ok ? process.exit(0) : process.exit(1)).catch(() => process.exit(1))"]
# interval: 30s
# timeout: 10s
# retries: 3
# start_period: 10s
# depends_on:
# postgres:
# condition: service_healthy
networks:
liquifact-network:
driver: bridge