2024-01-18 18:48:27 +02:00
|
|
|
version: '3'
|
|
|
|
|
|
|
|
services:
|
|
|
|
# # traefik
|
|
|
|
# traefik:
|
|
|
|
# image: "traefik:latest"
|
|
|
|
# network_mode: "host"
|
|
|
|
# container_name: "traefik"
|
|
|
|
# ports:
|
|
|
|
# - "80:80"
|
|
|
|
# - "443:443"
|
|
|
|
# volumes:
|
|
|
|
# - ./conf/traefik:/etc/traefik
|
|
|
|
# - ./conf/traefik_custom:/custom/:ro
|
|
|
|
# - /var/run/docker.sock:/var/run/docker.sock:ro
|
|
|
|
|
2024-01-29 21:55:20 +02:00
|
|
|
# rest api
|
|
|
|
app:
|
|
|
|
# build:
|
|
|
|
# context: .
|
|
|
|
# dockerfile: Dockerfile
|
2024-01-31 09:29:30 +02:00
|
|
|
image: registry.computernetthings.ru/recipes/app:latest
|
2024-01-29 21:55:20 +02:00
|
|
|
container_name: app
|
|
|
|
restart: unless-stopped
|
|
|
|
env_file: .env
|
|
|
|
environment:
|
2024-01-31 09:29:30 +02:00
|
|
|
CONFIG_PATH: ./config/dev.yaml
|
2024-01-29 21:55:20 +02:00
|
|
|
depends_on:
|
|
|
|
- app_pg
|
|
|
|
- redis
|
|
|
|
- minio
|
2024-01-31 11:20:32 +02:00
|
|
|
volumes:
|
|
|
|
- ./config:/build/config
|
2024-01-31 09:29:30 +02:00
|
|
|
labels:
|
|
|
|
- "traefik.enable=true"
|
|
|
|
- "traefik.http.routers.recipes_app.entrypoints=websecure"
|
|
|
|
- "traefik.http.routers.recipes_app.tls=true"
|
|
|
|
- "traefik.http.routers.recipes_app.tls.certresolver=production"
|
|
|
|
- "traefik.http.routers.recipes_app.rule=Host(`$API_HOST`)"
|
2024-01-29 21:55:20 +02:00
|
|
|
networks:
|
|
|
|
microservicesnet:
|
|
|
|
ipv4_address: 192.168.4.3
|
2024-01-18 18:48:27 +02:00
|
|
|
|
|
|
|
# postgresql database for app
|
|
|
|
app_pg:
|
|
|
|
image: postgres:16-alpine
|
|
|
|
container_name: app_pg
|
|
|
|
restart: unless-stopped
|
|
|
|
env_file: .env
|
|
|
|
environment:
|
|
|
|
POSTGRES_DB: $DB_NAME
|
|
|
|
POSTGRES_USER: $DB_USER
|
|
|
|
POSTGRES_PASSWORD: $DB_PASSWORD
|
|
|
|
PGDATA: "/var/lib/postgresql/data/pgdata"
|
|
|
|
volumes:
|
|
|
|
- ../docker_data/recipes2_data/pg/pg_data:/var/lib/postgresql/data
|
|
|
|
networks:
|
|
|
|
microservicesnet:
|
|
|
|
ipv4_address: 192.168.4.4
|
|
|
|
|
|
|
|
# minio
|
|
|
|
minio:
|
2024-01-31 11:20:32 +02:00
|
|
|
image: bitnami/minio:2024.1.16-debian-11-r0
|
2024-01-18 18:48:27 +02:00
|
|
|
container_name: minio
|
|
|
|
restart: unless-stopped
|
|
|
|
env_file: .env
|
|
|
|
environment:
|
|
|
|
- MINIO_ROOT_USER=$MINIO_ROOT_USER
|
|
|
|
- MINIO_ROOT_PASSWORD=$MINIO_ROOT_PASSWORD
|
|
|
|
ports:
|
|
|
|
- '9000:9000'
|
|
|
|
- '9001:9001'
|
|
|
|
networks:
|
|
|
|
microservicesnet:
|
|
|
|
ipv4_address: 192.168.4.5
|
|
|
|
|
|
|
|
redis:
|
|
|
|
image: redis:7.2-alpine
|
|
|
|
container_name: redis
|
|
|
|
restart: unless-stopped
|
|
|
|
env_file: .env
|
2024-01-27 18:51:46 +02:00
|
|
|
command: redis-server --loglevel warning --requirepass $RDB_PASSWORD # --save 20 1
|
2024-01-18 18:48:27 +02:00
|
|
|
networks:
|
|
|
|
microservicesnet:
|
|
|
|
ipv4_address: 192.168.4.7
|
|
|
|
|
2024-01-31 09:29:30 +02:00
|
|
|
# frontend
|
|
|
|
recipes_frontend:
|
|
|
|
image: registry.computernetthings.ru/recipes/front:latest
|
2024-01-31 13:53:17 +02:00
|
|
|
security_opt:
|
|
|
|
- seccomp:unconfined
|
2024-01-31 09:29:30 +02:00
|
|
|
container_name: recipes_frontend
|
|
|
|
restart: unless-stopped
|
|
|
|
labels:
|
|
|
|
- "traefik.enable=true"
|
|
|
|
- "traefik.http.routers.recipes_frontend.entrypoints=websecure"
|
|
|
|
- "traefik.http.routers.recipes_frontend.tls=true"
|
|
|
|
- "traefik.http.routers.recipes_frontend.tls.certresolver=production"
|
|
|
|
- "traefik.http.routers.recipes_frontend.rule=Host(`$FRONTEND_HOST`)"
|
|
|
|
networks:
|
|
|
|
microservicesnet:
|
|
|
|
ipv4_address: 192.168.4.6
|
2024-01-18 18:48:27 +02:00
|
|
|
|
|
|
|
networks:
|
|
|
|
microservicesnet:
|
|
|
|
ipam:
|
|
|
|
driver: default
|
|
|
|
config:
|
2024-01-27 18:51:46 +02:00
|
|
|
- subnet: "192.168.4.0/24"
|