-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
48 lines (48 loc) · 1.09 KB
/
docker-compose.yaml
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
services:
app:
build: .
extra_hosts:
- "host.docker.internal:host-gateway"
ports:
- "0.0.0.0:8000:8000"
depends_on:
redis:
condition: service_healthy
postgres:
condition: service_healthy
environment:
PORT: 8000
GIN_MODE: debug
KUBECONFIG: /etc/kind.conf
POSTGRES_HOST: postgres
POSTGRES_PORT: 5432
POSTGRES_USER: docker
POSTGRES_PASSWORD: docker
POSTGRES_DB: docker
volumes:
- ./kind.conf:/etc/kind.conf
postgres:
image: postgres:14
tmpfs:
- /var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready --dbname $$POSTGRES_DB --username $$POSTGRES_USER"]
interval: 1s
timeout: 5s
start_period: 5s
retries: 3
environment:
POSTGRES_DB: docker
POSTGRES_USER: docker
POSTGRES_PASSWORD: docker
redis:
image: redis:7
network_mode: host
tmpfs:
- /data
healthcheck:
test: ["CMD-SHELL", "redis-cli ping | grep PONG"]
interval: 1s
timeout: 5s
start_period: 5s
retries: 3