-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
39 lines (37 loc) · 962 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
version: '3.9'
services:
backend:
hostname: localhost
depends_on:
- database
build:
context: products
dockerfile: Dockerfile
args:
DEBUG: ${DEBUG}
PROJECT_NAME: ${PROJECT_NAME}
SERVER_NAME: ${SERVER_NAME}
POSTGRES_HOST: ${POSTGRES_HOST}
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_PORT: ${POSTGRES_PORT}
ports:
- "80:8081"
volumes:
- ./products:/products
privileged: true
database:
image: postgres:14.3
restart: always
volumes:
- ./database/data:/var/lib/postgresql/data
- ./database/backups:/backups
ports:
- "5432:5432"
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_PORT: ${POSTGRES_PORT}
POSTGRES_HOST: ${POSTGRES_HOST}