-
Notifications
You must be signed in to change notification settings - Fork 19
/
compose.yaml
46 lines (46 loc) · 1.27 KB
/
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
services:
database:
image: 'postgres:16.4'
container_name: database
hostname: database
environment:
POSTGRES_DB: ${DATABASE_DB}
POSTGRES_USER: ${DATABASE_USER}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
ports:
- ${DATABASE_EXPOSE_PORT}:5432
volumes:
- ${DATABASE_INIT}:/docker-entrypoint-initdb.d
- ${DATABASE_STORE}:/var/lib/postgresql/data
# - ${DATABASE_SSL}:/etc/ssl/certs
restart: always
# command: >
# -c ssl=on
# -c ssl_cert_file=/etc/ssl/certs/localhost.crt
# -c ssl_key_file=/etc/ssl/certs/localhost.key
web:
build:
context: .
dockerfile: ./Dockerfile
extra_hosts:
- host.docker.internal:host-gateway
container_name: web
hostname: web
environment:
LOG_PATH: ${LOG_PATH}
DATABASE_DB: ${DATABASE_DB}
DATABASE_USER: ${DATABASE_USER}
DATABASE_PASSWORD: ${DATABASE_PASSWORD}
DATABASE_HOST_PORT: ${DATABASE_HOST_PORT}
ALLOWED_ORIGINS: ${ALLOWED_ORIGINS}
ALLOWED_METHODS: ${ALLOWED_METHODS}
ALLOWED_HEADERS: ${ALLOWED_HEADERS}
depends_on:
- database
ports:
- ${WEB_EXPOSE_PORT}:8080
extra_hosts:
- host.docker.internal:host-gateway
volumes:
- ${LOG_PATH}:/var/log
restart: always