-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
59 lines (59 loc) · 1.28 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
59
version: '3'
services:
postgres:
image: postgres:latest
container_name: digi_lib_db
environment:
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASS}
- POSTGRES_DB=${DB_DATABASE}
volumes:
- ./dbdata:/var/lib/postgresql/data
- ./db.sql:/docker-entrypoint-initdb.d/dbdump.sql
ports:
- "${DB_PORT}:5432"
cache:
container_name: digi_lib_cache
image: redis:7.2.4-alpine
ports:
- '6379:6379'
command: redis-server --save 20 1 --loglevel warning
api:
container_name: digi_lib_api
build:
context: ./backend/
restart: always
environment:
- HOST_HOSTNAME=${HOSTNAME}
ports:
- "${API_PORT}:8082"
volumes:
- ./log:/opt/app/log
env_file:
- "./.env"
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "3"
depends_on:
- cache
- postgres
app:
container_name: digi_lib_app
build:
context: ./frontend/
restart: always
environment:
- HOST_HOSTNAME=${HOSTNAME}
ports:
- "${PORT}:3000"
env_file:
- "./.env"
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "3"
depends_on:
- api