D
Dokploy11mo ago
memphis

domain unreachable in docker-compose feature

hi, I'm having an issue when deploying grafana using docker-compose (raw). I have followed the existing documentation. but the domain still remains unreachable.
services:
grafana:
image: grafana/grafana
ports:
- 3010
networks:
- dokploy-network
restart: unless-stopped
labels:
- "traefik.enable=true"
- "traefik.http.routers.grafana.rule=Host(`grafana.mydomain.com`)"
- "traefik.http.routers.grafana.entrypoints=websecure"
- "traefik.http.routers.grafana.tls.certResolver=letsencrypt"
- "traefik.http.services.grafana.loadbalancer.server.port=3010"
volumes:
- grafana_data:/var/lib/grafana

networks:
dokploy-network:
external: true

volumes:
grafana_data:
services:
grafana:
image: grafana/grafana
ports:
- 3010
networks:
- dokploy-network
restart: unless-stopped
labels:
- "traefik.enable=true"
- "traefik.http.routers.grafana.rule=Host(`grafana.mydomain.com`)"
- "traefik.http.routers.grafana.entrypoints=websecure"
- "traefik.http.routers.grafana.tls.certResolver=letsencrypt"
- "traefik.http.services.grafana.loadbalancer.server.port=3010"
volumes:
- grafana_data:/var/lib/grafana

networks:
dokploy-network:
external: true

volumes:
grafana_data:
I have also set DNS in Cloudflare correctly. is there any solution?
18 Replies
Siumauricio
Siumauricio11mo ago
Whats the mode you have in cloudflare?
memphis
memphisOP11mo ago
flexible mode
Siumauricio
Siumauricio11mo ago
Delete the label of certificateResolver and in the entry point change to web instead of websecure
memphis
memphisOP11mo ago
like this
services:
grafana:
image: grafana/grafana
ports:
- 3010
networks:
- dokploy-network
restart: unless-stopped
labels:
- "traefik.enable=true"
- "traefik.http.routers.grafana.rule=Host(`grafana.mydomain.com`)"
- "traefik.http.routers.grafana.entrypoints=web"
- "traefik.http.services.grafana.loadbalancer.server.port=3010"
volumes:
- grafana_data:/var/lib/grafana

networks:
dokploy-network:
external: true

volumes:
grafana_data:
services:
grafana:
image: grafana/grafana
ports:
- 3010
networks:
- dokploy-network
restart: unless-stopped
labels:
- "traefik.enable=true"
- "traefik.http.routers.grafana.rule=Host(`grafana.mydomain.com`)"
- "traefik.http.routers.grafana.entrypoints=web"
- "traefik.http.services.grafana.loadbalancer.server.port=3010"
volumes:
- grafana_data:/var/lib/grafana

networks:
dokploy-network:
external: true

volumes:
grafana_data:
??
Siumauricio
Siumauricio11mo ago
Yes
memphis
memphisOP11mo ago
i've try with this and still bad gateway
Siumauricio
Siumauricio11mo ago
can you check the traefik logs in settings?
memphis
memphisOP11mo ago
only time="2024-07-20T18:48:21Z" level=info msg="Configuration loaded from file: /etc/traefik/traefik.yml" i've try for reload trafic but show error like this Error to reload the traefik or any step i missed?,
Siumauricio
Siumauricio11mo ago
all looks good, let me try
memphis
memphisOP11mo ago
is there anything that needs to be set in cloudflare?
Siumauricio
Siumauricio11mo ago
let me try to deploy for me its working
version: "3.8"
services:
grafana:
networks:
- dokploy-network
image: grafana/grafana-enterprise:9.5.20
restart: unless-stopped
ports:
- ${GRAFANA_PORT}
labels:
- traefik.enable=true
- traefik.http.routers.${HASH}.rule=Host(`${GRAFANA_HOST}`)
- traefik.http.services.${HASH}.loadbalancer.server.port=${GRAFANA_PORT}
volumes:
- grafana-storage:/var/lib/grafana
networks:
dokploy-network:
external: true
volumes:
grafana-storage: {}
version: "3.8"
services:
grafana:
networks:
- dokploy-network
image: grafana/grafana-enterprise:9.5.20
restart: unless-stopped
ports:
- ${GRAFANA_PORT}
labels:
- traefik.enable=true
- traefik.http.routers.${HASH}.rule=Host(`${GRAFANA_HOST}`)
- traefik.http.services.${HASH}.loadbalancer.server.port=${GRAFANA_PORT}
volumes:
- grafana-storage:/var/lib/grafana
networks:
dokploy-network:
external: true
volumes:
grafana-storage: {}
envs
GRAFANA_HOST=registry.dokploy.com
GRAFANA_PORT=3000
HASH=youtube-grafana-fd6837
GRAFANA_HOST=registry.dokploy.com
GRAFANA_PORT=3000
HASH=youtube-grafana-fd6837
just replace your domain in GRAFANA_HOST and deploy and that should be enough
memphis
memphisOP11mo ago
lemme try it woww, its workss. I'm still curious, is the error in the line - "traefik.http.routers.grafana.entrypoints=web" ? but thanks king 👑
Siumauricio
Siumauricio11mo ago
yeah probably 🤣
memphis
memphisOP11mo ago
hi I want to ask out of context, is it possible to change the db conf like my.cnf in mysql when we deploy the database? I've tried docker exec -it -u root but I can't write with vi, vim or nano is there any other approach to do that?
Siumauricio
Siumauricio11mo ago
what do you mean you cannot use nano with the integrated terminal in the browser?
memphis
memphisOP11mo ago
yapp, i can't Is there a solution for setting the database config?
𝗠𝗿𝟭𝗕𝗹𝗮𝘇𝗲
Yes create an docker application and in docker you can put your-config.conf In docker-hub exist a lot of images like : mysql , postgresql , …, etc
Siumauricio
Siumauricio11mo ago
We recenlty make a rework in File mounts, in theory you can add any config and then just bind to the database

Did you find this page helpful?