-
Notifications
You must be signed in to change notification settings - Fork 89
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
94 lines (88 loc) · 2.33 KB
/
Copy pathdocker-compose.prod.yml
File metadata and controls
94 lines (88 loc) · 2.33 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
version: '3.8'
services:
app:
image: ${IMAGE:-ghcr.io/oxdev-max/stellarswipe-backends}:${TAG:-latest}
container_name: stellarswipe-app
restart: unless-stopped
ports:
- '3000:3000'
environment:
NODE_ENV: production
PORT: 3000
HOST: 0.0.0.0
DATABASE_HOST: ${DATABASE_HOST}
DATABASE_PORT: ${DATABASE_PORT:-5432}
DATABASE_USER: ${DATABASE_USER}
DATABASE_PASSWORD: ${DATABASE_PASSWORD}
DATABASE_NAME: ${DATABASE_NAME}
REDIS_HOST: ${REDIS_HOST}
REDIS_PORT: ${REDIS_PORT:-6379}
REDIS_PASSWORD: ${REDIS_PASSWORD}
STELLAR_NETWORK: ${STELLAR_NETWORK:-mainnet}
STELLAR_HORIZON_URL: ${STELLAR_HORIZON_URL}
STELLAR_SOROBAN_RPC_URL: ${STELLAR_SOROBAN_RPC_URL}
STELLAR_NETWORK_PASSPHRASE: ${STELLAR_NETWORK_PASSPHRASE}
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
networks:
- stellarswipe-network
deploy:
resources:
limits:
cpus: '1'
memory: 512M
postgres:
image: postgres:15-alpine
container_name: stellarswipe-postgres
restart: unless-stopped
environment:
POSTGRES_USER: ${DATABASE_USER}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
POSTGRES_DB: ${DATABASE_NAME}
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U ${DATABASE_USER}']
interval: 10s
timeout: 5s
retries: 5
networks:
- stellarswipe-network
redis:
image: redis:7-alpine
container_name: stellarswipe-redis
restart: unless-stopped
command: redis-server --requirepass ${REDIS_PASSWORD} --save 60 1
volumes:
- redis_data:/data
healthcheck:
test: ['CMD', 'redis-cli', '-a', '${REDIS_PASSWORD}', 'ping']
interval: 10s
timeout: 5s
retries: 5
networks:
- stellarswipe-network
nginx:
image: nginx:alpine
container_name: stellarswipe-nginx
restart: unless-stopped
ports:
- '80:80'
- '443:443'
volumes:
- ./docker/nginx.conf:/etc/nginx/conf.d/default.conf:ro
- nginx_certs:/etc/nginx/certs
depends_on:
- app
networks:
- stellarswipe-network
volumes:
postgres_data:
redis_data:
nginx_certs:
networks:
stellarswipe-network:
driver: bridge