Finished the installation but the website is down

hi everyone,

I trying to setup the erpnext with the docker-compose, its succeeded but the website didn’t generate.
I used the option ( Setup ERPNext using containerized MariaDB and Redis with Letsencrypt certificates) which didn’t work.
then I added the proxy to the formula

docker-compose -f compose.yaml \
  -f overrides/compose.proxy.yaml \
  -f overrides/compose.erpnext.yaml \
  -f overrides/compose.mariadb.yaml \
  -f overrides/compose.redis.yaml \
  -f overrides/compose.https.yaml \
  config > erpnext/docker-compose.yml

the plan did succeeded as below, but the website didn’t generated,

Creating erpnext_proxy_1 ... done
Creating erpnext_db_1    ... done
Creating erpnext_redis_1 ... done
Creating erpnext_configurator_1 ... done
Creating erpnext_websocket_1     ... done
Creating erpnext_queue-long_1    ... done
Creating erpnext_queue-short_1   ... done
Creating erpnext_backend_1       ... done
Creating erpnext_queue-default_1 ... done
Creating erpnext_scheduler_1     ... done
Creating erpnext_frontend_1      ... done

the website return the message " This site can’t be reached"
also this one were included from the doc “add-custom-domain-using-traefik”, this is the frontend - labels in the docker-compose.yml

    labels:
      traefik.enable: "true"
      traefik.http.routers.frontend-http.entrypoints: web
      traefik.http.routers.frontend-http.rule: HostRegexp(`{any:.+}`)
      traefik.http.routers.frontend-http.tls.certresolver: main-resolver
      traefik.http.services.frontend.loadbalancer.server.port: '8080'
      traefik.http.routers.custom-domain.rule: Host(`dev.mysite.com`)
      traefik.http.middlewares.custom-domain.headers.customrequestheaders.Host: dev.mysite.com
      traefik.http.routers.custom-domain.middlewares: dev.mysite.com

any help is highly appreciated.

thanks in advance

1 Like

hi,

dose the old format for the .env still valid

I try to walk the doc step by step, its now return an error:

ERROR: Invalid interpolation format for "image" option in service "x-backend-defaults": "frappe/frappe-worker:${FRAPPE_VERSION:?No Frappe version set}"

any help here

any support is highly appreciated

still no one supporting.

I return and start over on a fresh server, the same error return:

ERROR: Invalid interpolation format for "image" option in service "x-backend-defaults": "frappe/frappe-worker:${FRAPPE_VERSION:?No Frappe version set}"

then I try to build the docker-compose.yaml myself as below:

services:
  backend:
    depends_on:
      configurator:
        condition: service_completed_successfully
    image: frappe/erpnext-worker:v13.24.0
    volumes:
      - sites:/home/frappe/frappe-bench/sites:rw
      - assets:/home/frappe/frappe-bench/sites/assets:ro
  configurator:
    command: configure.py
    depends_on:
      db:
        condition: service_healthy
      redis:
        condition: service_started
    environment:
      DB_HOST: mariadb
      DB_PORT: 3306
      REDIS_CACHE: redis:6379/0
      REDIS_QUEUE: redis:6379/1
      REDIS_SOCKETIO: redis:6379/2
      SOCKETIO_PORT: 9000
    image: frappe/erpnext-worker:v13.24.0
    volumes:
      - sites:/home/frappe/frappe-bench/sites:rw
  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: 123
    healthcheck:
      interval: 1s
      retries: 15
      test: mysqladmin ping -h localhost --password=123
    image: mariadb:10.6
    volumes:
      - db-data:/var/lib/mysql:rw
  frontend:
    depends_on:
      backend:
        condition: service_started
      websocket:
        condition: service_started
    environment:
      BACKEND: backend:8000
      FRAPPE_SITE_NAME_HEADER: $$$$host
      SOCKETIO: websocket:9000
      UPSTREAM_REAL_IP_ADDRESS: 127.0.0.1
      UPSTREAM_REAL_IP_HEADER: X-Forwarded-For
      UPSTREAM_REAL_IP_RECURSIVE: "off"
    image: frappe/erpnext-nginx:v13.24.0
    labels:
      traefik.enable: "true"
      traefik.http.routers.frontend-http.entrypoints: websecure
      traefik.http.routers.frontend-http.tls.certresolver: main-resolver
      traefik.http.services.frontend.loadbalancer.server.port: '8080'
      traefik.http.routers.custom-domain.rule: Host(`my.site.com`)
      traefik.http.middlewares.custom-domain.headers.customrequestheaders.Host: my.site.com
      traefik.http.routers.custom-domain.middlewares: my.site.com
    volumes:
      - assets:/usr/share/nginx/html/assets:rw
      - sites:/usr/share/nginx/html/sites:rw
  proxy:
    command:
      - --providers.docker=true
      - --providers.docker.exposedbydefault=false
      - --entrypoints.web.address=:80
      - --entrypoints.web.http.redirections.entrypoint.to=websecure
      - --entrypoints.web.http.redirections.entrypoint.scheme=https
      - --entrypoints.websecure.address=:443
      - --certificatesResolvers.main-resolver.acme.httpChallenge=true
      - --certificatesResolvers.main-resolver.acme.httpChallenge.entrypoint=web
      - --certificatesResolvers.main-resolver.acme.email=my.mail@gmail.com
      - --certificatesResolvers.main-resolver.acme.storage=/letsencrypt/acme.json
    image: traefik:2.5
    ports:
      - published: 80
        target: 80
      - published: 443
        target: 443
    volumes:
      - cert-data:/letsencrypt:rw
      - /var/run/docker.sock:/var/run/docker.sock:ro
  queue-default:
    command: bench worker --queue default
    depends_on:
      configurator:
        condition: service_completed_successfully
    image: frappe/erpnext-worker:v13.24.0
    volumes:
      - sites:/home/frappe/frappe-bench/sites:rw
  queue-long:
    command: bench worker --queue long
    depends_on:
      configurator:
        condition: service_completed_successfully
    image: frappe/erpnext-worker:v13.24.0
    volumes:
      - sites:/home/frappe/frappe-bench/sites:rw
  queue-short:
    command: bench worker --queue short
    depends_on:
      configurator:
        condition: service_completed_successfully
    image: frappe/erpnext-worker:v13.24.0
    volumes:
      - sites:/home/frappe/frappe-bench/sites:rw
  redis:
    image: redis:6.2-alpine
    volumes:
      - redis-data:/data:rw
  scheduler:
    command: bench schedule
    depends_on:
      configurator:
        condition: service_completed_successfully
    image: frappe/erpnext-worker:v13.24.0
    volumes:
      - sites:/home/frappe/frappe-bench/sites:rw
  websocket:
    depends_on:
      configurator:
        condition: service_completed_successfully
    image: frappe/frappe-socketio:v13.24.0
    volumes:
      - sites:/home/frappe/frappe-bench/sites:rw
version: '3.9'
volumes:
  assets: {}
  cert-data: {}
  db-data: {}
  redis-data: {}
  sites: {}

but when I run it it returns this error

root@vmi708758:~/frappe_docker# docker-compose -f erpnext/docker-compose.yml up -d
ERROR: Version in "./erpnext/docker-compose.yml" is unsupported. You might be seeing this error because you're using the wrong Compose file version. Either specify a supported version (e.g "2.2" or "3.3") and place your service definitions under the `services` key, or omit the `version` key and place your service definitions at the root of the file to use version 1.
For more on the Compose file format versions, see https://docs.docker.com/compose/compose-file/

Hello

Did you try accessing the website on the 8000 port first with no reverse proxy.

I recommend trying getting it working using http to begin with with no reverse proxy to keep things simple - just to make sure everything is working in a simple setup first.

After initiating a create new site command it does it take some time ~5 minutes for the website to get built.

If installing on VPS make sure the relavent ports are open.

hi jaycron

I would like to thank you for your time and reply.

its been two days working on this, the update is that I started fresh server, and out of the box I’m stuck with this error:

root@vmi708758:~/frappe_docker# docker-compose -f compose.yaml -f overrides/compose.noproxy.yaml config > erpnext/docker-compose.yml
ERROR: Invalid interpolation format for "image" option in service "x-backend-defaults": "frappe/frappe-worker:${FRAPPE_VERSION:?No Frappe version set}"

this error is before the build, it on generating the docker-compose.yaml file

I do not have much experience with docker compose but I believe this is a docker issue and not erpnext.

What version of linux are you using, because some distributions have outdated versions of docker compose

See here:

thanks very much, you were very helpful.

I checked the docker compose version it was 2.25 I update it with there github to version 2.3.4 then the magic happened and every thing went smoothly.

thanks again, i’d never thinked a fresh server would be outdated.

you made my day

2 Likes

sorry

one small question, about the ssl for the docker setup, is there a link or doc to walk through.

thanks

follow the post.

there’s an open PR which still needs some fixes.