-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
58 lines (53 loc) · 1.27 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
version: '3'
services:
postgresql:
image: postgres:15.5-alpine3.18
command: ["postgres", "-c", "port=${BLAH_BLAH_CHAT_DATABASE_PORT}"]
volumes:
- postgres_bbc:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "bbc", "-p", "${BLAH_BLAH_CHAT_DATABASE_PORT}", "-d", "blah_blah_chat_production"]
interval: 5s
env_file: .env
environment:
POSTGRES_USER: bbc
POSTGRES_PASSWORD: bbc_password
ports:
- "${BLAH_BLAH_CHAT_DATABASE_PORT}:${BLAH_BLAH_CHAT_DATABASE_PORT}"
networks:
- postgres
redis:
image: redis:7.2.3-alpine3.18
volumes:
- redis_bbc:/data
command: redis-server
healthcheck:
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
interval: 5s
networks:
- redis
app:
image: blah-blah-chat:1.1
# image: ghcr.io/rubygitflow/blah_blah_chat:latest
ports:
- '3322:3000'
env_file: .env
depends_on:
- postgresql
- redis
healthcheck:
test: ["CMD", "curl", "-i", "-f", "http://localhost:3000/up"]
interval: 10s
timeout: 10s
retries: 3
networks:
- postgres
- redis
volumes:
postgres_bbc:
redis_bbc:
networks:
postgres:
driver: bridge
redis:
driver: bridge