-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
55 lines (52 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
services:
teryl:
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
container_name: teryl
build:
context: ./
ports:
- '3000:3000'
restart: 'no'
environment:
DATABASE_URL: 'postgresql://postgres:postgres@host.docker.internal:5432/teryl?schema=public'
INTERNAL_RING_URL: http://host.docker.internal:3001/guilds
REDIS_HOST: host.docker.internal
env_file:
- src/.env
- src/.env.development.local
postgres:
container_name: teryl-postgres
image: 'postgres:15-alpine'
ports:
- '5432:5432'
restart: 'no'
volumes:
- 'teryl-postgres-data:/var/lib/postgresql/data'
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=teryl
healthcheck:
test: ['CMD-SHELL', 'pg_isready']
interval: 30s
timeout: 60s
retries: 5
start_period: 80s
redis:
command: 'redis-server --port 8287 --requirepass redis'
container_name: teryl-redis
image: 'redis:alpine'
ports:
- '8287:8287'
restart: 'no'
healthcheck:
test: ['CMD-SHELL', 'redis-cli ping | grep PONG']
interval: 1s
timeout: 3s
retries: 5
volumes:
teryl-postgres-data: