66 lines
1.9 KiB
YAML
66 lines
1.9 KiB
YAML
name: rust-discovery-dev
|
|
services:
|
|
postgres:
|
|
image: postgres:17.6-bookworm
|
|
environment:
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?run deploy/dev.py init}
|
|
volumes:
|
|
- pgdata:/var/lib/postgresql/data
|
|
- ../devstate/init.sql:/docker-entrypoint-initdb.d/10-rmm.sql:ro
|
|
healthcheck:
|
|
test: [CMD-SHELL, "pg_isready -U postgres -d rmm"]
|
|
interval: 2s
|
|
timeout: 3s
|
|
retries: 30
|
|
networks: [backend]
|
|
migrate:
|
|
build:
|
|
context: ..
|
|
dockerfile: deploy/Dockerfile
|
|
image: rust-discovery-dev:local
|
|
command: [migrate]
|
|
environment:
|
|
MIGRATION_DATABASE_URL: ${MIGRATION_DATABASE_URL:?}
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
networks: [backend]
|
|
server:
|
|
image: rust-discovery-dev:local
|
|
environment:
|
|
RMM_PROFILE: development
|
|
RMM_DEV_AUTH: "true"
|
|
RMM_SERVER_ROLE: all
|
|
DATABASE_URL: ${DATABASE_URL:?}
|
|
RMM_VIEWER_A: ${RMM_VIEWER_A:?}
|
|
RMM_VIEWER_B: ${RMM_VIEWER_B:?}
|
|
RMM_TLS_DIR: /pki
|
|
RMM_JOB_KEY_FILE: /jobs/ed25519.pem
|
|
RMM_WEB_DIR: /web
|
|
RMM_DEV_USERNAME: ${RMM_DEV_USERNAME:-}
|
|
RMM_DEV_PASSWORD: ${RMM_DEV_PASSWORD:-}
|
|
RMM_OPERATOR_A: ${RMM_OPERATOR_A:-}
|
|
RMM_OPERATOR_B: ${RMM_OPERATOR_B:-}
|
|
ports: ["127.0.0.1:18443:18443"]
|
|
volumes:
|
|
- ../devstate/pki:/pki:ro
|
|
- ../devstate/jobs:/jobs
|
|
- ../web/dist:/web:ro
|
|
user: "${RMM_UID:?}:${RMM_GID:?}"
|
|
read_only: true
|
|
cap_drop: [ALL]
|
|
security_opt: [no-new-privileges:true]
|
|
depends_on:
|
|
migrate:
|
|
condition: service_completed_successfully
|
|
# Docker does not publish ports on an internal-only bridge on this host.
|
|
# Only the TLS server joins ingress; PostgreSQL remains backend-only.
|
|
networks: [backend, ingress]
|
|
restart: unless-stopped
|
|
networks:
|
|
ingress:
|
|
backend:
|
|
internal: true
|
|
volumes:
|
|
pgdata:
|