96 lines
2.0 KiB
YAML
96 lines
2.0 KiB
YAML
services:
|
|
hydra:
|
|
image: oryd/hydra:v2.3.0
|
|
command: serve -c /etc/config/hydra/hydra.yml all --dev
|
|
depends_on:
|
|
- hydra-migrate
|
|
volumes:
|
|
- type: bind
|
|
source: ./config/hydra
|
|
target: /etc/config/hydra
|
|
networks:
|
|
- appnet
|
|
env_file:
|
|
- ./config/hydra/.env
|
|
hydra-migrate:
|
|
image: oryd/hydra:v2.3.0
|
|
command: migrate -c /etc/config/hydra/hydra.yml sql up -e --yes
|
|
volumes:
|
|
- type: bind
|
|
source: ./config/hydra
|
|
target: /etc/config/hydra
|
|
networks:
|
|
- appnet
|
|
env_file:
|
|
- ./config/hydra/.env
|
|
|
|
depends_on:
|
|
- db
|
|
nginx:
|
|
container_name: "logidexid"
|
|
image: nginx:latest
|
|
volumes:
|
|
- type: bind
|
|
source: ./config/nginx/nginx.conf
|
|
target: /etc/nginx/conf.d/default.conf
|
|
read_only: true
|
|
labels:
|
|
- "traefik.enable=true"
|
|
depends_on:
|
|
- front
|
|
- back
|
|
- hydra
|
|
networks:
|
|
- appnet
|
|
ports:
|
|
- "80:80"
|
|
front:
|
|
image: git.logidex.ru/aserbin/logidex-id-frontend:latest
|
|
environment:
|
|
- NODE_ENV=production
|
|
networks:
|
|
- appnet
|
|
back:
|
|
image: git.logidex.ru/fakz9/id-backend:latest
|
|
depends_on:
|
|
redis:
|
|
condition: service_healthy
|
|
networks:
|
|
- appnet
|
|
volumes:
|
|
- ./config/back/.env:/app/.env
|
|
- ./config/back/config.yaml:/app/config.yaml
|
|
redis:
|
|
image: redis
|
|
command: [ "redis-server", "--save", "60", "1", "--appendonly", "no" ]
|
|
volumes:
|
|
- redis_data:/data
|
|
networks:
|
|
- appnet
|
|
healthcheck:
|
|
test: [ "CMD" ,"redis-cli", "ping" ]
|
|
interval: 5s
|
|
timeout: 2s
|
|
retries: 5
|
|
db:
|
|
image: postgres:17-alpine
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
POSTGRES_DB: hydra
|
|
volumes:
|
|
- db:/var/lib/postgresql/data
|
|
networks:
|
|
- appnet
|
|
networks:
|
|
appnet:
|
|
external: false
|
|
# proxy:
|
|
# external: true
|
|
|
|
volumes:
|
|
redis_data:
|
|
db:
|
|
driver: local
|