-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
45 lines (44 loc) · 1.17 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
version: '3.8'
services:
hainz-db:
container_name: hainz-db
image: postgres:15.1-alpine
restart: always
environment:
- POSTGRES_USER=${POSTGRES_USERNAME}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DATABASE}
ports:
- '5432:${POSTGRES_PORT}'
volumes:
- db:/var/lib/postgresql/data
hainz-redis:
container_name: hainz-redis
image: redis:7.0.7-alpine
restart: always
command: redis-server --save ${REDIS_SAVE_AFTER_SECONDS} ${REDIS_SAVE_AFTER_WRITES} --loglevel warning
ports:
- '6379:${REDIS_PORT}'
volumes:
- cache:/data
hainz-app:
container_name: hainz-app
image: hainz-app
restart: always
build: .
depends_on:
- hainz-db
- hainz-redis
environment:
- PERSISTENCE_USERNAME=${POSTGRES_USERNAME}
- PERSISTENCE_PASSWORD=${POSTGRES_PASSWORD}
- PERSISTENCE_HOSTNAME=hainz-db
- PERSISTENCE_PORT=${POSTGRES_PORT}
- PERSISTENCE_DB=${POSTGRES_DATABASE}
- CACHE_HOSTNAME=hainz-redis
- CACHE_PORT=${REDIS_PORT}
volumes:
db:
driver: local
cache:
driver: local