-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
49 lines (46 loc) · 1.25 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
services:
postgres:
image: postgres:latest
user: postgres
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
ports:
- "127.0.0.1:${POSTGRES_CONTAINER_PORT}:${POSTGRES_PORT}"
volumes:
- pgdata:/var/lib/postgresql/data
- "./sql/ddl.sql:/docker-entrypoint-initdb.d/ddl.sql"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $POSTGRES_USER -d $POSTGRES_DB -h localhost -p 5432"]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:latest
ports:
- "127.0.0.1:${REDIS_CONTAINER_PORT}:${REDIS_PORT}"
command: ["redis-server", "--requirepass", "${REDIS_PASSWORD}"]
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
sast-link-backend:
image: sast/sast-link-backend:latest
build:
context: .
dockerfile: ./docker/Dockerfile
ports:
- "127.0.0.1:${SASTLINK_CONTAINER_PORT}:${SASTLINK_PORT}"
environment:
CONFIG_FILE: ${CONFIG_FILE}
volumes:
- ${CONFIG_PATH}:/sastlink/config
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
volumes:
pgdata: