Client billing code push
This commit is contained in:
110
docker-compose.yml
Normal file
110
docker-compose.yml
Normal file
@@ -0,0 +1,110 @@
|
||||
version: "3.9"
|
||||
|
||||
services:
|
||||
traefik:
|
||||
image: traefik:v2.11.28
|
||||
command:
|
||||
- "--api.insecure=true"
|
||||
- "--api.dashboard=true"
|
||||
- "--providers.docker=true"
|
||||
- "--providers.docker.exposedbydefault=false"
|
||||
- "--entrypoints.web.address=:80" # container internal port
|
||||
ports:
|
||||
- "8085:80" # host port changed to 8085
|
||||
- "8090:8080" # Traefik dashboard
|
||||
volumes:
|
||||
- "/var/run/docker.sock:/var/run/docker.sock:ro"
|
||||
networks:
|
||||
- billing-network
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "curl -f http://127.0.0.1:8080/api/overview || exit 1"]
|
||||
interval: 15s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
flask-app:
|
||||
build: .
|
||||
ports:
|
||||
- "5003:5002" # internal container port
|
||||
|
||||
depends_on:
|
||||
mysql:
|
||||
condition: service_healthy
|
||||
openldap:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
FLASK_APP: run:app
|
||||
FLASK_ENV: development
|
||||
FLASK_RUN_HOST: 0.0.0.0
|
||||
FLASK_RUN_PORT: 5002
|
||||
MYSQL_HOST: mysql
|
||||
MYSQL_PORT: 3306
|
||||
MYSQL_USER: root
|
||||
MYSQL_PASSWORD: admin
|
||||
MYSQL_DB: excel_data7
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.client-billing-flask.rule=Host(`flask.lcepl.local`)"
|
||||
- "traefik.http.routers.client-billing-flask.entrypoints=web"
|
||||
- "traefik.http.services.client-billing-flask.loadbalancer.server.port=5002"
|
||||
networks:
|
||||
- billing-network
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://127.0.0.1:5002/"]
|
||||
interval: 15s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
start_period: 20s
|
||||
|
||||
mysql:
|
||||
image: mysql:8.0
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: admin
|
||||
MYSQL_DATABASE: excel_data7
|
||||
ports:
|
||||
- "3307:3306" # external access if needed
|
||||
volumes:
|
||||
- mysql-data:/var/lib/mysql
|
||||
networks:
|
||||
- billing-network
|
||||
restart: always
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "mysqladmin ping -h 127.0.0.1 -uroot -padmin --silent"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
start_period: 20s
|
||||
|
||||
openldap:
|
||||
image: osixia/openldap:1.5.0
|
||||
environment:
|
||||
LDAP_ORGANISATION: "LCEPL"
|
||||
LDAP_DOMAIN: "lcepl.org"
|
||||
LDAP_ADMIN_PASSWORD: admin
|
||||
ports:
|
||||
- "1389:389" # optional external access
|
||||
- "1636:636"
|
||||
volumes:
|
||||
- openldap-data:/var/lib/ldap
|
||||
- openldap-config:/etc/ldap/slapd.d
|
||||
- ./ldifs:/container/service/slapd/assets/bootstrap/ldifs:rw
|
||||
networks:
|
||||
- billing-network
|
||||
restart: always
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "ldapsearch -x -H ldap://127.0.0.1:389 -D 'cn=admin,dc=lcepl,dc=org' -w admin -b 'dc=lcepl,dc=org' >/dev/null 2>&1 || exit 1"]
|
||||
interval: 20s
|
||||
timeout: 10s
|
||||
retries: 20
|
||||
start_period: 60s
|
||||
|
||||
volumes:
|
||||
mysql-data:
|
||||
openldap-data:
|
||||
openldap-config:
|
||||
|
||||
networks:
|
||||
billing-network:
|
||||
driver: bridge
|
||||
Reference in New Issue
Block a user