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

62 lines
1.6 KiB
Text

---
services:
# copy that's run locally in docker,
# app files are mounted for quick-reload and fast iterations
dev:
container_name: <%= @sso_service_name %>
hostname: <%= @sso_service_name %>
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:
- default
- sso-proxy
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:
device: <%= @pocs_storage_dir %>
o: bind
type: none
networks:
sso-proxy:
external: true
name: <%= @sso_proxy_network %>