name: frappe_docker services: backend: depends_on: configurator: condition: service_completed_successfully image: erpnexthp:1.0.0 networks: erpnext_network: null volumes: - type: volume source: erpnext_data-sites target: /home/frappe/frappe-bench/sites volume: {} configurator: command: - | ls -1 apps > sites/apps.txt; bench set-config -g db_host $$DB_HOST; bench set-config -gp db_port $$DB_PORT; bench set-config -g redis_cache "redis://$$REDIS_CACHE"; bench set-config -g redis_queue "redis://$$REDIS_QUEUE"; bench set-config -g redis_socketio "redis://$$REDIS_SOCKETIO"; bench set-config -gp socketio_port $$SOCKETIO_PORT; depends_on: db: condition: service_healthy redis-cache: condition: service_started redis-queue: condition: service_started redis-socketio: condition: service_started entrypoint: - bash - -c environment: DB_HOST: db DB_PORT: "3306" REDIS_CACHE: redis-cache:6379 REDIS_QUEUE: redis-queue:6379 REDIS_SOCKETIO: redis-socketio:6379 SOCKETIO_PORT: "9000" image: erpnexthp:1.0.0 networks: erpnext_network: null volumes: - type: volume source: erpnext_data-sites target: /home/frappe/frappe-bench/sites volume: {} db: command: - --character-set-server=utf8mb4 - --collation-server=utf8mb4_unicode_ci - --skip-character-set-client-handshake - --skip-innodb-read-only-compressed environment: MYSQL_ROOT_PASSWORD: EoxXraNDDYSdY5Hq healthcheck: test: - CMD-SHELL - mysqladmin ping -h localhost --password=EoxXraNDDYSdY5Hq interval: 1s retries: 15 image: mariadb:10.6 networks: erpnext_network: null volumes: - type: volume source: db-data target: /var/lib/mysql volume: {} frontend-1: command: - nginx-entrypoint.sh depends_on: backend: condition: service_started websocket: condition: service_started environment: BACKEND: backend:8000 CLIENT_MAX_BODY_SIZE: 50m FRAPPE_SITE_NAME_HEADER: erp.prothmann.com PROXY_READ_TIMOUT: "120" SOCKETIO: websocket:9000 UPSTREAM_REAL_IP_ADDRESS: 127.0.0.1 UPSTREAM_REAL_IP_HEADER: X-Forwarded-For UPSTREAM_REAL_IP_RECURSIVE: "off" image: erpnexthp:1.0.0 networks: erpnext_network: null proxy: null ports: - mode: ingress target: 8080 published: "8082" protocol: tcp volumes: - type: volume source: erpnext_data-sites target: /home/frappe/frappe-bench/sites volume: {} labels: traefik.docker.network: proxy traefik.enable: "true" traefik.http.routers.erpnext-secure.entrypoints: websecure traefik.http.routers.erpnext-secure.middlewares: default@file traefik.http.routers.erpnext-secure.rule: Host(`erp.prothmann.com`) traefik.http.routers.erpnext-secure.service: erpnext traefik.http.routers.erpnext-secure.tls: "true" traefik.http.routers.erpnext-secure.tls.certresolver: http_resolver traefik.http.routers.erpnext.entrypoints: web traefik.http.routers.erpnext.rule: Host(`erp.prothmann.com`) traefik.http.services.erpnext.loadbalancer.server.port: "8080" frontend-2: command: - nginx-entrypoint.sh depends_on: backend: condition: service_started websocket: condition: service_started environment: BACKEND: backend:8000 CLIENT_MAX_BODY_SIZE: 50m FRAPPE_SITE_NAME_HEADER: erp.ppa.prothmann.com PROXY_READ_TIMOUT: "120" SOCKETIO: websocket:9000 UPSTREAM_REAL_IP_ADDRESS: 127.0.0.1 UPSTREAM_REAL_IP_HEADER: X-Forwarded-For UPSTREAM_REAL_IP_RECURSIVE: "off" image: erpnexthp:1.0.0 networks: erpnext_network: null proxy: null ports: - mode: ingress target: 8080 published: "8080" protocol: tcp volumes: - type: volume source: erpnext_data-sites target: /home/frappe/frappe-bench/sites volume: {} labels: traefik.docker.network: proxy traefik.enable: "true" traefik.http.routers.erpnext-ppa-secure.entrypoints: websecure traefik.http.routers.erpnext-ppa-secure.middlewares: default@file traefik.http.routers.erpnext-ppa-secure.rule: Host(`erp.ppa.prothmann.com`) traefik.http.routers.erpnext-ppa-secure.service: erpnext-ppa traefik.http.routers.erpnext-ppa-secure.tls: "true" traefik.http.routers.erpnext-ppa-secure.tls.certresolver: http_resolver traefik.http.routers.erpnext-ppa.entrypoints: web traefik.http.routers.erpnext-ppa.rule: Host(`erp.ppa.prothmann.com`) traefik.http.services.erpnext-ppa.loadbalancer.server.port: "8080" queue-default: command: - bench - worker - --queue - default depends_on: configurator: condition: service_completed_successfully image: erpnexthp:1.0.0 networks: erpnext_network: null volumes: - type: volume source: erpnext_data-sites target: /home/frappe/frappe-bench/sites volume: {} queue-long: command: - bench - worker - --queue - long depends_on: configurator: condition: service_completed_successfully image: erpnexthp:1.0.0 networks: erpnext_network: null volumes: - type: volume source: erpnext_data-sites target: /home/frappe/frappe-bench/sites volume: {} queue-short: command: - bench - worker - --queue - short depends_on: configurator: condition: service_completed_successfully image: erpnexthp:1.0.0 networks: erpnext_network: null volumes: - type: volume source: erpnext_data-sites target: /home/frappe/frappe-bench/sites volume: {} redis-cache: image: redis:6.2-alpine networks: erpnext_network: null volumes: - type: volume source: redis-cache-data target: /data volume: {} redis-queue: image: redis:6.2-alpine networks: erpnext_network: null volumes: - type: volume source: redis-queue-data target: /data volume: {} redis-socketio: image: redis:6.2-alpine networks: erpnext_network: null volumes: - type: volume source: redis-socketio-data target: /data volume: {} scheduler: command: - bench - schedule depends_on: configurator: condition: service_completed_successfully image: erpnexthp:1.0.0 networks: erpnext_network: null volumes: - type: volume source: erpnext_data-sites target: /home/frappe/frappe-bench/sites volume: {} websocket: command: - node - /home/frappe/frappe-bench/apps/frappe/socketio.js depends_on: configurator: condition: service_completed_successfully image: erpnexthp:1.0.0 networks: erpnext_network: null volumes: - type: volume source: erpnext_data-sites target: /home/frappe/frappe-bench/sites volume: {} networks: erpnext_network: name: erpnext_network driver: bridge ipam: config: - subnet: 172.33.0.0/16 attachable: true proxy: external: true volumes: db-data: name: frappe_docker_db-data redis-cache-data: name: frappe_docker_redis-cache-data redis-queue-data: name: frappe_docker_redis-queue-data redis-socketio-data: name: frappe_docker_redis-socketio-data erpnext_data-sites: driver: local driver_opts: type: nfs o: "addr=192.168.102.14,rw,nolock,nfsvers=4,async" device: ":/data/docker-volumes/erpnext_data/sites" x-backend-defaults: depends_on: configurator: condition: service_completed_successfully image: frappe/erpnext:v14.29.1 volumes: - sites:/home/frappe/frappe-bench/sites x-customizable-image: image: erpnexthp:1.0.0 pull_policy: never x-depends-on-configurator: depends_on: configurator: condition: service_completed_successfully # Setting up a site: # change directory to docker directory for erpnext (cd /srv/docker/erpnext) # # docker compose exec backend bench new-site erp.prothmann.com --mariadb-root-password EoxXraNDDYSdY5Hq --install-app erpnext --admin-password veiph1ahrieM # Build new image: in /opt/frappe_docker: #./build.sh