soc-ops/global/overlay/etc/puppet/modules/soc/templates/vuln-dashboard/docker-compose.yml.erb

90 lines
2.4 KiB
Text
Raw Normal View History

2024-12-06 12:35:49 +01:00
---
services:
dev:
2024-12-06 12:35:49 +01:00
container_name: <%= @sso_service_name %>
2025-02-17 10:54:29 +01:00
hostname: <%= @sso_service_name %>
2024-12-06 12:35:49 +01:00
depends_on:
2025-02-17 13:09:37 +01:00
postgres:
condition: service_started
run-migrations:
condition: service_completed_successfully
2025-02-17 10:54:29 +01:00
image: <%= @docker_image %>:<%= @docker_tag %>
2024-12-06 12:35:49 +01:00
environment:
DB_NAME: <%= @db_name %>
DB_USER: <%= @db_user %>
DB_PW: <%= @db_pass %>
DB_HOST: <%= @db_host %>
DB_PORT: <%= @db_port %>
CENSYS_API_ID: <%= @censys_api_id %>
CENSYS_API_SECRET: <%= @censys_api_secret %>
2025-02-17 11:12:14 +01:00
DJANGO_ALLOWED_HOSTS: <%= @allowed_hosts %>
2025-02-17 10:54:29 +01:00
DJANGO_ALLOWED_ORIGINS: <%= @allowed_origins %>
2025-02-17 10:59:47 +01:00
STATIC_ROOT: /app/static
2025-02-17 11:00:43 +01:00
DASHBOARD_CONFIG_FILE: /app/config.yaml
2024-12-06 12:35:49 +01:00
init: true
volumes:
- pocs-data:/app/stored_pocs
2025-02-17 11:05:13 +01:00
- "<%= @app_config_file %>:/app/config.yaml:ro"
2024-12-06 12:35:49 +01:00
networks:
- default
2025-02-17 10:54:29 +01:00
- sso-proxy
2024-12-06 12:35:49 +01:00
2025-02-17 13:09:37 +01:00
run-migrations:
container_name: <%= @sso_service_name %>-migrations
command: [ 'python3', 'manage.py', 'migrate' ]
depends_on:
- postgres
image: <%= @docker_image %>:<%= @docker_tag %>
environment:
DB_NAME: <%= @db_name %>
DB_USER: <%= @db_user %>
DB_PW: <%= @db_pass %>
DB_HOST: <%= @db_host %>
DB_PORT: <%= @db_port %>
CENSYS_API_ID: <%= @censys_api_id %>
CENSYS_API_SECRET: <%= @censys_api_secret %>
DJANGO_ALLOWED_HOSTS: <%= @allowed_hosts %>
DJANGO_ALLOWED_ORIGINS: <%= @allowed_origins %>
STATIC_ROOT: /app/static
DASHBOARD_CONFIG_FILE: /app/config.yaml
init: true
volumes:
- pocs-data:/app/stored_pocs
- "<%= @app_config_file %>:/app/config.yaml:ro"
networks:
- sso-proxy
2024-12-06 12:35:49 +01:00
postgres:
container_name: postgres
image: postgres:latest
environment:
POSTGRES_DB: <%= @db_name %>
POSTGRES_USER: <%= @db_user %>
POSTGRES_PASSWORD: <%= @db_pass %>
volumes:
- postgres-data:/var/lib/postgresql/data # Maps local folder to the container's data folder
restart: always # Ensures that the container restarts if it crashes or is stopped
networks:
- default
volumes:
postgres-data:
driver: local
driver_opts:
device: <%= @db_datadir %>
o: bind
type: none
pocs-data:
driver: local
driver_opts:
2024-12-06 13:26:30 +01:00
device: <%= @pocs_storage_dir %>
2024-12-06 12:35:49 +01:00
o: bind
type: none
networks:
2025-02-17 10:54:29 +01:00
sso-proxy:
2024-12-06 12:35:49 +01:00
external: true
2025-02-17 10:54:29 +01:00
name: <%= @sso_proxy_network %>