docker login REGISTRY_URL services:
traefik:
image: traefik:v2.9.4
container_name: traefik-hydra
restart: always
volumes:
- ./traefik.yml:/etc/traefik/traefik.yml:ro
- /var/hydra/traefik/acme:/var/traefik/acme
- /var/run/docker.sock:/var/run/docker.sock:ro
ports:
- 80:80
- 443:443
healthcheck:
test: 'traefik healthcheck'
timeout: 5s
retries: 3
interval: 1m
postgres:
image: postgres:17.4
container_name: postgres-hydra
restart: always
env_file: '.postgres.env'
volumes:
- /var/hydra/postgres:/var/lib/postgresql/data
hydra-server:
image: REGISTRY_URL/hydra-server:latest
container_name: hydra-server
restart: always
stop_grace_period: 10m
volumes:
- /etc/localtime:/etc/localtime:ro
-
./hydra_server.yml:/opt/hydra/server/config/hydra_server.yml:ro
environment:
- TZ=UTC
- JAVA_OPTS=-Xmx2000M -Duser.timezone=UTC
-XX:MaxMetaspaceSize=512M
memcached-hoper:
image: memcached:1.6.15-alpine
container_name: memcached-hoper
restart: always
healthcheck:
test: echo stats | nc 127.0.0.1 11211
hoper:
image: REGISTRY_URL/hoper-pg:latest
container_name: hoper
restart: always
volumes:
- /etc/localtime:/etc/localtime:ro
-
./hoper_configuration.yml:/etc/hydra/hoper_configuration.yml:ro
- ./supervisord.conf:/opt/hydra/supervisord.conf:ro
env_file: '.hoper.env'
environment:
- TZ=Europe/Moscow
- MEMCACHED_URL=memcached-hoper
- RAILS_ENV=production
- HYDRA_CONFIG_PATH=/opt/hydra/hoper
healthcheck:
test: 'wget -q --spider http://127.0.0.1:3000/login'
timeout: 5s
retries: 3
start_period: 2m
interval: 1m
labels:
- traefik.enable=true
- traefik.http.services.hoper.loadbalancer.server.port=3000
- traefik.http.routers.hoper.rule=Host(`HOST`)
- traefik.http.routers.hoper.entrypoints=port80
providers:
docker:
exposedByDefault: false
file:
directory: /etc/traefik/conf
watch: true
entryPoints:
traefik:
address: :18080
port80:
address: :80
forwardedHeaders:
trustedIPs:
- 192.168.0.253
port443:
address: :443
certificatesResolvers:
letsencrypt:
acme:
email: support@latera.ru
storage: /var/traefik/acme/acme.json
httpChallenge:
entryPoint: port80
api:
dashboard: false
ping: {}
accessLog: {}
log:
level: INFO POSTGRES_DB=hydra
POSTGRES_USER=hydra
POSTGRES_PASSWORD=POSTGRES_PASSWORD database:
type: postgres
postgres:
timezone: Europe/Moscow
url: jdbc:postgresql://postgres-hydra:5432/hydra
user: hydra
search_path: hydra,ais_net,public
password: POSTGRES_PASSWORD
pool:
max_connection_lifetime: 0
size:
min: 5
max: 1000
scheduler:
enabled: false
api:
host: 0.0.0.0
port: 8080
internal_secret: internal_secret
object_storage:
endpoints:
internal: "http://localhost:9000"
external: "http://localhost:9000"
access_key: access_key
secret_key: secret_key
region: eu-west-1
buckets:
billing:
name: hydra