59 lines
1.4 KiB
Text
59 lines
1.4 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 %>
|
|
depends_on:
|
|
- postgres
|
|
image: dashboard-dev:<%= @docker_tag %>
|
|
pull_policy: never
|
|
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 %>
|
|
ports:
|
|
- "127.0.0.1:8000:8000"
|
|
init: true
|
|
volumes:
|
|
- pocs-data:/app/stored_pocs
|
|
networks:
|
|
- default
|
|
- sso
|
|
|
|
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:
|
|
external: true
|