-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yml
57 lines (52 loc) · 1.16 KB
/
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
############
# SERVICES #
############
services:
###############
# NOTABLE APP #
###############
notable-app:
build:
context: .
dockerfile: Dockerfile.app
restart: "unless-stopped"
container_name: notable-app
networks:
- intranet
ports:
- "127.0.0.1:9001:9000"
volumes:
- ".:/var/www/html"
working_dir: /var/www/html
depends_on:
- notable-db
notable-db:
image: "docker.io/library/postgres:alpine"
platform: linux/amd64
restart: "unless-stopped"
ports:
- "127.0.0.1:5432:5432"
environment:
PGDATA: /var/lib/postgresql/data/pgdata
POSTGRES_DB: "${DB_DATABASE}"
POSTGRES_USER: "${DB_USERNAME}"
POSTGRES_PASSWORD: "${DB_PASSWORD}"
volumes:
- "./docker_services/db_service/pg_data:/var/lib/postgresql/data"
container_name: notable-db
networks:
- intranet
healthcheck:
interval: 10s
test:
- CMD-SHELL
- "pg_isready -U ${DB_USERNAME} -d ${DB_DATABASE}"
timeout: 5s
retries: 5
##################
# DOCKER NETWORK #
##################
networks:
intranet:
name: intranet
driver: bridge