freelance-project-34-market.../docker-compose.yml
Siarhei Siniak 01e98958a6 [+] update docker-compose
1. use PartOf for proper
    dependency management;
  2. add hard coded subnet,
    with specific ip for app;
    to use in ufw rules;
2025-09-30 07:30:38 +03:00

115 lines
2.6 KiB
YAML

version: '3.7'
services:
app:
build:
context: .
dockerfile: ./docker/app/Dockerfile
volumes:
- ./d1/:/app/d1/:ro
- ./tmp/cache/:/app/tmp/cache/:ro
restart: on-failure
networks:
network:
ipv4_address: ${SUBNET}.2
nginx-exporter:
image: docker.io/nginx/nginx-prometheus-exporter@sha256:6edfb73afd11f2d83ea4e8007f5068c3ffaa38078a6b0ad1339e5bd2f637aacd
#profiles:
# - podman
#env_file:
# .envs/nginx-exporter.env
environment:
SCRAPE_URI: http://ssl-app:80/_metrics
# LISTEN_ADDRESS: 0.0.0.0:9113
ports:
- ${NGINX_EXPORTER_PORTS:-"127.0.0.1:9113"}:9113
networks:
network:
ssl-app:
build:
context: .
dockerfile: ./docker/ssl-app/Dockerfile
volumes:
- ./d1/:/app/d1/:ro
- ./tmp/d1/:/app/tmp/d1/:ro
- ./tmp/d1/letsencrypt:/etc/letsencrypt:rw
restart: on-failure
networks:
network:
checks:
build:
context: ./docker/checks
dockerfile: ./Dockerfile
init: true
env_file:
.envs/checks.patched.env
command:
- python3
- -m
- online.fxreader.pr34.commands_typed.async_api.fastapi
ports:
- ${CHECKS_PORTS:-"127.0.0.1:80"}:80
networks:
network:
cpanel:
image: online.fxreader.pr34.cpanel:dev
build:
context: .
dockerfile: ./docker/cpanel/Dockerfile
#links:
# - app
volumes:
- ./d1/:/app/d1:ro
- ./tmp/d1/:/app/tmp/d1/:ro
restart: on-failure
networks:
network:
dynu:
build:
context: .
dockerfile: ./docker/dynu/Dockerfile
profiles:
- broken
volumes:
- ./d1/dynu_update.py:/app/d1/dynu_update.py:ro
- ./tmp/cache/dynu.auth.json:/app/tmp/cache/dynu.auth.json:ro
restart: on-failure
# links:
# - ngrok
networks:
network:
ngrok:
image: wernight/ngrok
#links:
# - app
profiles:
- broken
command: ['ngrok', 'http', 'app:80']
volumes:
- ./tmp/cache/ngrok.yml:/home/ngrok/.ngrok2/ngrok.yml:ro
restart: on-failure
networks:
network:
#forward:
# build:
# context: .
# dockerfile: ./docker/forward/Dockerfile
# volumes:
# - ./d1/forward.py:/app/d1/forward.py:ro
# - ./tmp/cache/forward_data:/app/tmp/cache/forward_data:ro
# restart: always
networks:
network:
driver: bridge
# driver_opts:
# com.docker.network.bridge.name: br-mynet # stable bridge name (optional)
ipam:
config:
- subnet: ${SUBNET}.0/24
gateway: "${SUBNET}.1"
ip_range: "${SUBNET}.128/25" # optional: pool for containers