-
Notifications
You must be signed in to change notification settings - Fork 9
/
docker-compose.yml
96 lines (91 loc) · 2.81 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# FACT_DOCKER_DOCKER_GID
# - The group id of the docker group on the host
# FACT_DOCKER_DOCKER_MOUNT_BASE_DIR
# - Path to the docker-mount-base-dir as specified in main.cfg
# FACT_DOCKER_FIRMWARE_FILE_STORAGE_DIR
# - Path to the firmware-file-storage-directory as specified in main.cfg
# FACT_DOCKER_FIRMWARE_FILE_STORAGE_DIR_GID
# - The group id of the group of FACT_DOCKER_FIRMWARE_FILE_STORAGE_DIR
# FACT_DOCKER_FRONTEND_PORT
# - The port that the webserver should run on
# FACT_DOCKER_MAIN_CFG_PATH
# - Path to the main FACT config main.cfg
# FACT_DOCKER_POSTGRES_PASSWORD
# - Password for postgres admin user
# FACT_DOCKER_UWSGI_CONFIG_INI_PATH
# - Path to the uwsgi-config.ini
services:
fact-frontend:
image: ghcr.io/fkie-cad/fact-core-frontend:${FACT_DOCKER_VERSION}
command: start-frontend
ports:
- "${FACT_DOCKER_FRONTEND_PORT:-5000}:5000"
networks:
- fact-network
group_add:
- "${FACT_DOCKER_DOCKER_GID}"
volumes:
# This is needed for generating pdf reports.
- type: bind
source: "${DOCKER_HOST:-/var/run/docker.sock}"
target: /var/run/docker.sock
- type: bind
source: "${FACT_DOCKER_DOCKER_MOUNT_BASE_DIR}"
target: /tmp/fact-docker-mount-base-dir/
- type: bind
source: "${FACT_DOCKER_MAIN_CFG_PATH}"
target: /opt/FACT_core/src/config/main.cfg
- type: bind
source: "${FACT_DOCKER_UWSGI_CONFIG_INI_PATH}"
target: /opt/FACT_core/src/config/uwsgi_config.ini
depends_on:
- database
- redis
fact-backend:
image: ghcr.io/fkie-cad/fact-core-backend:${FACT_DOCKER_VERSION}
command: start-backend
networks:
- fact-network
group_add:
- "${FACT_DOCKER_DOCKER_GID}"
- "${FACT_DOCKER_FIRMWARE_FILE_STORAGE_DIR_GID}"
volumes:
- type: bind
source: "${DOCKER_HOST:-/var/run/docker.sock}"
target: /var/run/docker.sock
- type: bind
source: "${FACT_DOCKER_MAIN_CFG_PATH}"
target: /opt/FACT_core/src/config/main.cfg
- type: bind
source: "${FACT_DOCKER_UWSGI_CONFIG_INI_PATH}"
target: /opt/FACT_core/src/config/uwsgi_config.ini
- type: bind
source: "${FACT_DOCKER_DOCKER_MOUNT_BASE_DIR}"
target: /tmp/fact-docker-mount-base-dir/
- type: bind
source: "${FACT_DOCKER_FIRMWARE_FILE_STORAGE_DIR}"
target: /media/data/fact_fw_data
depends_on:
- database
- redis
database:
image: postgres
networks:
- fact-network
environment:
POSTGRES_PASSWORD: "${FACT_DOCKER_POSTGRES_PASSWORD}"
expose:
- 5432
volumes:
- fact_postgres_data:/var/lib/postgresql/data
redis:
image: redis
networks:
- fact-network
expose:
- 6379
networks:
fact-network: {}
volumes:
fact_postgres_data:
external: true