docker-compose.yaml
Rama main · réplica de lectura del repositorio original.
services:
# When you change this service, please also change the corresponding service in `find . -name docker-compose.yaml`
postgres16:
build:
context: ./postgres/postgres16
volumes:
- postgres16_data:/var/lib/postgresql/data
- ./postgresql.conf:/etc/postgresql/postgresql.conf
- ./pg_hba.conf:/etc/postgresql/pg_hba.conf
# NOTE(postgresql-tls): Uncomment the following lines to enable TLS
#- ./tls-cert.pem:/etc/postgresql/server.crt
#- ./tls-key.pem:/etc/postgresql/server.key
command:
- postgres
- "-c"
- "config_file=/etc/postgresql/postgresql.conf"
- "-c"
- "hba_file=/etc/postgresql/pg_hba.conf"
environment:
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "postgres"
ports:
# In case you need to use psql or other GUI client to connect to the database,
# you need to connect via the 6432 port.
# Otherwise, psql or other GUI client will consume the connection count.
- "6432:5432"
pgbouncer:
image: edoburu/pgbouncer:v1.24.1-p1
command:
- pgbouncer
- /etc/pgbouncer/pgbouncer.ini
volumes:
- ./pgbouncer.ini:/etc/pgbouncer/pgbouncer.ini
- ./pgbouncer-users.txt:/etc/pgbouncer/users.txt
# NOTE(postgresql-tls): Uncomment the following lines to enable TLS
#- ./tls-cert.pem:/etc/pgbouncer/server.crt
#- ./tls-key.pem:/etc/pgbouncer/server.key
#- ./rootCA.pem:/etc/pgbouncer/ca.crt
ports:
- "5432:5432"
# When you change this service, please also change the corresponding service in `find . -name docker-compose.yaml`
redis:
# Azure cache for Redis supports 6.0 only
image: redis:6.0.20
# NOTE(redis-tls): In case you want to test Redis TLS, uncomment the following lines
# command:
# - redis-server
# - /usr/local/etc/redis/redis.conf
volumes:
- redis_data:/data
# NOTE(redis-tls): In case you want to test Redis TLS, uncomment the following lines
# tls-cert.pem and tls-key.pem are generated with `make mkcert`.
# - ./redis.conf:/usr/local/etc/redis/redis.conf
# - ./tls-cert.pem:/usr/local/etc/redis/redis.crt
# - ./tls-key.pem:/usr/local/etc/redis/redis.key
ports:
- "6379:6379"
elasticsearch:
# It seems 7.16.2 has some problem with cgroup.
# This problem occurs when I switched to containerd in Docker Desktop for macOS.
# Using the latest 7 (As of 2024-02-25, it is 7.17.27) solves this problem.
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.27
environment:
discovery.type: single-node
ports:
- "9200:9200"
- "9300:9300"
volumes:
- elasticsearch_data:/usr/share/elasticsearch/data
proxy:
# nginx has mainline (1.odd_minor_version) and stable (1.even_minor_version) release.
# We use stable here.
image: nginx:stable
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
- ./tls-key.pem:/etc/nginx/tls-key.pem
- ./tls-cert.pem:/etc/nginx/tls-cert.pem
ports:
- "8000:8000"
- "8001:8001"
- "8010:8010"
- "8011:8011"
- "8100:8100"
- "3100:3100"
#- "443:443"
extra_hosts:
- "host.docker.internal:host-gateway"
prometheus:
image: prom/prometheus:v2.55.1
command:
# These 4 arguments are original found in the Dockerfile.
# See https://github.com/prometheus/prometheus/blob/v2.55.1/Dockerfile#L25
# Since we have to add extra arguments, we need to repeat them here.
# See https://prometheus.io/docs/prometheus/latest/installation/#setting-command-line-parameters
- "--config.file=/etc/prometheus/prometheus.yml"
- "--storage.tsdb.path=/prometheus"
- "--web.console.libraries=/usr/share/prometheus/console_libraries"
- "--web.console.templates=/usr/share/prometheus/consoles"
# Enable remote write
- "--web.enable-remote-write-receiver"
ports:
- "9090:9090"
otelcol:
image: otel/opentelemetry-collector-contrib:0.114.0
environment:
# In production (opentelemetry-collector Helm chart), this is injected
# automatically from the pod name via the downward API. Locally there
# is only one replica and no Kubernetes, so we set a fixed value here.
OTEL_K8S_POD_NAME: "otelcol-0"
volumes:
- ./otelcol-config.yaml:/etc/otelcol-contrib/config.yaml
ports:
- "4318:4318"
- "5514:5514"
minio:
image: quay.io/minio/minio:RELEASE.2024-11-07T00-52-20Z
command:
- "minio"
- "server"
- "/data"
- "--console-address"
- ":9001"
volumes:
- minio_data:/data
ports:
- "9000:9000"
- "9001:9001"
environment:
# This can be used as access key ID.
# But do not do this in production.
# See https://min.io/docs/minio/linux/administration/identity-access-management/minio-user-management.html#minio-root-user
MINIO_ROOT_USER: "minio"
# This must be at least 8 characters
# this can be used as secret access key.
# But do not do this in production.
# See https://min.io/docs/minio/linux/administration/identity-access-management/minio-user-management.html#minio-root-user
MINIO_ROOT_PASSWORD: "secretpassword"
ldap:
profiles: ["ldap"]
image: bitnami/openldap:2.6
ports:
- "1389:1389"
- "1636:1636"
volumes:
- openldap_data:/bitnami/openldap
environment:
LDAP_ADMIN_USERNAME: "admin"
LDAP_ADMIN_PASSWORD: "adminpassword"
LDAP_ADMIN_DN: "cn=admin,dc=example,dc=org"
LDAP_ROOT: "dc=example,dc=org"
phpldapadmin:
profiles: ["ldap"]
image: osixia/phpldapadmin:stable
ports:
- "18080:80"
environment:
PHPLDAPADMIN_LDAP_HOSTS: "#PYTHON2BASH:[{'ldap': [{'server': [{'tls': False}, {'port': 1389}]},{'login': [{'bind_id': 'cn=admin,dc=example,dc=org'},{'bind_pass': 'adminpassword'}]}]}]"
PHPLDAPADMIN_HTTPS: "false"
PHPLDAPADMIN_LDAP_CLIENT_TLS: "false"
loki:
image: grafana/loki:3.3.2
command: -config.file=/etc/loki/config.yaml
volumes:
- ./loki-config.yaml:/etc/loki/config.yaml
ports:
- "3102:3100"
tempo:
image: grafana/tempo:2.6.1
command: ["-config.file=/etc/tempo.yaml"]
volumes:
- ./tempo-config.yaml:/etc/tempo.yaml
ports:
- "3104:3200"
grafana:
profiles: ["grafana"]
image: grafana/grafana:11.3.0
environment:
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
- GF_AUTH_DISABLE_LOGIN_FORM=true
volumes:
- ./grafana-datasources.yaml:/etc/grafana/provisioning/datasources/datasources.yaml
ports:
- "3103:3000"
volumes:
redis_data:
driver: local
postgres16_data:
driver: local
elasticsearch_data:
driver: local
openldap_data:
driver: local
minio_data:
driver: local