mirror of
https://github.com/Infisical/infisical.git
synced 2025-03-14 10:27:49 +00:00
199 lines
4.6 KiB
YAML
199 lines
4.6 KiB
YAML
version: "3.9"
|
|
|
|
services:
|
|
nginx:
|
|
container_name: infisical-dev-nginx
|
|
image: nginx
|
|
restart: always
|
|
ports:
|
|
- 8080:80
|
|
- 8443:443
|
|
volumes:
|
|
- ./nginx/default.dev.conf:/etc/nginx/conf.d/default.conf:ro
|
|
depends_on:
|
|
- backend
|
|
- frontend
|
|
|
|
db:
|
|
image: postgres:14-alpine
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- postgres-data:/var/lib/postgresql/data
|
|
environment:
|
|
POSTGRES_PASSWORD: infisical
|
|
POSTGRES_USER: infisical
|
|
POSTGRES_DB: infisical
|
|
|
|
redis:
|
|
image: redis
|
|
container_name: infisical-dev-redis
|
|
environment:
|
|
- ALLOW_EMPTY_PASSWORD=yes
|
|
ports:
|
|
- 6379:6379
|
|
volumes:
|
|
- redis_data:/data
|
|
|
|
redis-commander:
|
|
container_name: infisical-dev-redis-commander
|
|
image: rediscommander/redis-commander
|
|
restart: always
|
|
depends_on:
|
|
- redis
|
|
environment:
|
|
- REDIS_HOSTS=local:redis:6379
|
|
ports:
|
|
- "8085:8081"
|
|
|
|
db-test:
|
|
profiles: ["test"]
|
|
image: postgres:14-alpine
|
|
ports:
|
|
- "5430:5432"
|
|
environment:
|
|
POSTGRES_PASSWORD: infisical
|
|
POSTGRES_USER: infisical
|
|
POSTGRES_DB: infisical-test
|
|
|
|
backend:
|
|
container_name: infisical-dev-api
|
|
build:
|
|
context: ./backend
|
|
dockerfile: Dockerfile.dev
|
|
depends_on:
|
|
db:
|
|
condition: service_started
|
|
redis:
|
|
condition: service_started
|
|
env_file:
|
|
- .env
|
|
ports:
|
|
- 4000:4000
|
|
- 9464:9464 # for OTEL collection of Prometheus metrics
|
|
environment:
|
|
- NODE_ENV=development
|
|
- DB_CONNECTION_URI=postgres://infisical:infisical@db/infisical?sslmode=disable
|
|
- TELEMETRY_ENABLED=false
|
|
volumes:
|
|
- ./backend/src:/app/src
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
|
|
prometheus:
|
|
image: prom/prometheus
|
|
volumes:
|
|
- ./prometheus.dev.yml:/etc/prometheus/prometheus.yml
|
|
ports:
|
|
- "9090:9090"
|
|
command:
|
|
- "--config.file=/etc/prometheus/prometheus.yml"
|
|
profiles: [metrics]
|
|
|
|
otel-collector:
|
|
image: otel/opentelemetry-collector-contrib
|
|
volumes:
|
|
- ./otel-collector-config.yaml:/etc/otelcol-contrib/config.yaml
|
|
ports:
|
|
- 1888:1888 # pprof extension
|
|
- 8888:8888 # Prometheus metrics exposed by the Collector
|
|
- 8889:8889 # Prometheus exporter metrics
|
|
- 13133:13133 # health_check extension
|
|
- 4317:4317 # OTLP gRPC receiver
|
|
- 4318:4318 # OTLP http receiver
|
|
- 55679:55679 # zpages extension
|
|
profiles: [metrics-otel]
|
|
|
|
grafana:
|
|
image: grafana/grafana
|
|
container_name: grafana
|
|
restart: unless-stopped
|
|
environment:
|
|
- GF_LOG_LEVEL=debug
|
|
ports:
|
|
- "3005:3000"
|
|
volumes:
|
|
- "grafana_storage:/var/lib/grafana"
|
|
profiles: [metrics]
|
|
|
|
frontend:
|
|
container_name: infisical-dev-frontend
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- backend
|
|
build:
|
|
context: ./frontend
|
|
dockerfile: Dockerfile.dev
|
|
volumes:
|
|
- ./frontend/src:/app/src/ # mounted whole src to avoid missing reload on new files
|
|
- ./frontend/public:/app/public
|
|
env_file: .env
|
|
|
|
pgadmin:
|
|
image: dpage/pgadmin4
|
|
restart: always
|
|
environment:
|
|
PGADMIN_DEFAULT_EMAIL: admin@example.com
|
|
PGADMIN_DEFAULT_PASSWORD: pass
|
|
ports:
|
|
- 5050:80
|
|
depends_on:
|
|
- db
|
|
|
|
smtp-server:
|
|
container_name: infisical-dev-smtp-server
|
|
image: lytrax/mailhog:latest # https://github.com/mailhog/MailHog/issues/353#issuecomment-821137362
|
|
restart: always
|
|
logging:
|
|
driver: "none" # disable saving logs
|
|
ports:
|
|
- 1025:1025 # SMTP server
|
|
- 8025:8025 # Web UI
|
|
|
|
openldap: # note: more advanced configuration is available
|
|
image: osixia/openldap:1.5.0
|
|
restart: always
|
|
environment:
|
|
LDAP_ORGANISATION: Acme
|
|
LDAP_DOMAIN: acme.com
|
|
LDAP_ADMIN_PASSWORD: admin
|
|
ports:
|
|
- 389:389
|
|
- 636:636
|
|
volumes:
|
|
- ldap_data:/var/lib/ldap
|
|
- ldap_config:/etc/ldap/slapd.d
|
|
profiles: [ldap]
|
|
|
|
phpldapadmin: # username: cn=admin,dc=acme,dc=com, pass is admin
|
|
image: osixia/phpldapadmin:latest
|
|
restart: always
|
|
environment:
|
|
- PHPLDAPADMIN_LDAP_HOSTS=openldap
|
|
- PHPLDAPADMIN_HTTPS=false
|
|
ports:
|
|
- 6433:80
|
|
depends_on:
|
|
- openldap
|
|
profiles: [ldap]
|
|
|
|
keycloak:
|
|
image: quay.io/keycloak/keycloak:26.1.0
|
|
restart: always
|
|
environment:
|
|
- KC_BOOTSTRAP_ADMIN_PASSWORD=admin
|
|
- KC_BOOTSTRAP_ADMIN_USERNAME=admin
|
|
command: start-dev
|
|
ports:
|
|
- 8088:8080
|
|
profiles: [sso]
|
|
|
|
volumes:
|
|
postgres-data:
|
|
driver: local
|
|
redis_data:
|
|
driver: local
|
|
ldap_data:
|
|
ldap_config:
|
|
grafana_storage:
|