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 # rest api app: # build: # context: . # dockerfile: Dockerfile image: registry.computernetthings.ru/recipes/app:latest container_name: app restart: unless-stopped env_file: .env environment: CONFIG_PATH: ./config/dev.yaml depends_on: - app_pg - redis - minio volumes: - ./config:/build/config 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`)" networks: microservicesnet: ipv4_address: 192.168.4.3 # 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: image: bitnami/minio:2024.1.16-debian-11-r0 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 command: redis-server --loglevel warning --requirepass $RDB_PASSWORD # --save 20 1 networks: microservicesnet: ipv4_address: 192.168.4.7 # frontend recipes_frontend: image: registry.computernetthings.ru/recipes/front:latest 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 networks: microservicesnet: ipam: driver: default config: - subnet: "192.168.4.0/24"