-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
44 lines (41 loc) · 999 Bytes
/
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
version: "3.5"
services:
auth-service:
build: .
env_file: .env
ports:
- "8080:8080"
depends_on:
- postgres
- redis
restart: unless-stopped
postgres:
image: postgres:12.7
environment:
POSTGRES_DB: ${DB_NAME}
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
PGDATA: "/var/lib/postgresql/data"
volumes:
- db-data:/var/lib/postgresql/data
hostname: postgres_host
ports:
- "5432:5432"
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USER} -d ${DB_NAME} -h ${DB_HOST} -p ${DB_PORT}"]
start_period: 10s
redis:
image: "redis:5.0.7-alpine"
command: >
--requirepass ${REDIS_PASSWORD}
hostname: redis_host
ports:
- "6379:6379"
restart: unless-stopped
healthcheck:
test: ["CMD", "redis-cli", "ping"]
start_period: 10s
volumes:
db-data:
driver: local