-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
50 lines (45 loc) · 1.03 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
version: '3'
services:
database:
image: postgres:15.2-alpine
volumes:
- postgres_data:/var/lib/postgresql/data/
- ./database/scripts:/docker-entrypoint-initdb.d/
healthcheck:
test: ["CMD-SHELL", "sh -c 'pg_isready -U ${LITSCAN_USER} -d ${LITSCAN_DB}'"]
interval: 5s
retries: 10
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=postgres
- LITSCAN_USER=${LITSCAN_USER}
- LITSCAN_PASSWORD=${LITSCAN_PASSWORD}
- LITSCAN_DB=${LITSCAN_DB}
restart: unless-stopped
producer:
build:
context: .
dockerfile: producer/Dockerfile
ports:
- "8080:8080"
environment:
ENVIRONMENT: "DOCKER"
depends_on:
- database
tty: true
restart: always
consumer:
build:
context: .
dockerfile: consumer/Dockerfile
ports:
- "8081:8081"
environment:
ENVIRONMENT: "DOCKER"
depends_on:
- database
tty: true
restart: always
volumes:
postgres_data: