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
|
|
|
|
|
|
|
|
# # rest api
|
|
|
|
# app:
|
|
|
|
# build:
|
|
|
|
# context: .
|
|
|
|
# dockerfile: Dockerfile
|
|
|
|
# container_name: app
|
|
|
|
# restart: unless-stopped
|
|
|
|
# env_file: .env
|
|
|
|
# environment:
|
|
|
|
# DB_ADDR: app_pg:5432
|
|
|
|
# MINIO_ADDR: minio:9000
|
|
|
|
# depends_on:
|
|
|
|
# - app_pg
|
|
|
|
# labels:
|
|
|
|
# - "traefik.enable=true"
|
|
|
|
# - "traefik.http.routers.app.entrypoints=websecure"
|
|
|
|
# - "traefik.http.routers.app.tls=true"
|
|
|
|
# - "traefik.http.routers.app.tls.certresolver=production"
|
|
|
|
# - "traefik.http.routers.app.rule=Host(`$API_HOST`) && PathPrefix(`/api/v1/`)"
|
|
|
|
# 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:latest
|
|
|
|
container_name: minio
|
|
|
|
restart: unless-stopped
|
|
|
|
env_file: .env
|
|
|
|
environment:
|
|
|
|
- MINIO_ROOT_USER=$MINIO_ROOT_USER
|
|
|
|
- MINIO_ROOT_PASSWORD=$MINIO_ROOT_PASSWORD
|
|
|
|
volumes:
|
2024-01-21 12:52:21 +02:00
|
|
|
- ../docker_data/recipes2_data/minio:/bitnami/minio/data:z
|
2024-01-18 18:48:27 +02:00
|
|
|
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 --save 20 1 --loglevel warning --requirepass $RDB_PASSWORD
|
|
|
|
volumes:
|
|
|
|
- ../docker_data/recipes2_data/cache:/date
|
|
|
|
networks:
|
|
|
|
microservicesnet:
|
|
|
|
ipv4_address: 192.168.4.7
|
|
|
|
|
|
|
|
# # frontend
|
|
|
|
# frontend_service:
|
|
|
|
# image: registry.computernetthings.ru/parallel/frontend:latest
|
|
|
|
# container_name: frontend_service
|
|
|
|
# restart: unless-stopped
|
|
|
|
# labels:
|
|
|
|
# - "traefik.enable=true"
|
|
|
|
# - "traefik.http.routers.frontend_service.entrypoints=websecure"
|
|
|
|
# - "traefik.http.routers.frontend_service.tls=true"
|
|
|
|
# - "traefik.http.routers.frontend_service.tls.certresolver=production"
|
|
|
|
# - "traefik.http.routers.frontend_service.rule=Host(`$FRONTEND_HOST`)"
|
|
|
|
# networks:
|
|
|
|
# microservicesnet:
|
|
|
|
# ipv4_address: 192.168.4.6
|
|
|
|
|
|
|
|
networks:
|
|
|
|
microservicesnet:
|
|
|
|
ipam:
|
|
|
|
driver: default
|
|
|
|
config:
|
|
|
|
- subnet: "192.168.4.0/24"
|