cloudflare / cloudflare/cloudflared
🐛 Inconsistent behavior in docker compose
- Dominant language
- Go
- Stars
- 15.6k
- Forks
- 1.4k
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
A clear and concise description of what the bug is.
Check the screenshots mentioned below, I am facing different behaviour in both the scenarios.
**To Reproduce**
Steps to reproduce the behavior:
1. Configure 'docker compose and docker'
3. Run 'sudo docker compose up -d'
4. See error '502 Bad Gateway'

If it's an issue with Cloudflare Tunnel:
6. Tunnel ID :
7. cloudflared config:
**Expected behavior**
A clear and concise description of what you expected to happen.
Plex is working fine just with the name of the service when entered in Web GUI dashboard.

`docker-compose.yml` for plex:
```
---
version: "3.7"
services:
plex:
image: lscr.io/linuxserver/plex
container_name: plex
#network_mode: host
environment:
- PUID=1000
- PGID=1000
- VERSION=docker
- PLEX_CLAIM=
volumes:
- ./plex-config:/config
ports:
- 32400:32400
#- 1900:1900/udp
- 3005:3005
#- 5353:5353/udp
- 8324:8324
- 32410:32410/udp
- 32412:32412/udp
- 32413:32413/udp
- 32414:32414/udp
- 32469:32469
restart: unless-stopped
networks:
- plex-net
tunnel:
container_name: cloudflared-tunnel-plex
image: cloudflare/cloudflared
restart: unless-stopped
command: tunnel run
environment:
- TUNNEL_TOKEN=
networks:
- plex-net
networks:
plex-net:
name: plex-net
```
But it is not working fine with filerun:

`docker-compose.yml` for filerun:
```
---
version: "3.9"
services:
web:
image: filerun/filerun:arm64v8
container_name: filerun
environment:
FR_DB_HOST: db
FR_DB_PORT: 3306
FR_DB_NAME: your_mysql_database
FR_DB_USER: your_mysql_username
FR_DB_PASS: your_mysql_password
APACHE_RUN_USER: pi
APACHE_RUN_USER_ID: 1000
APACHE_RUN_GROUP: pi
APACHE_RUN_GROUP_ID: 1000
depends_on:
- db
ports:
- 8090:80
volumes:
- ./html:/var/www/html
- /media/pi/64122F72122F47FE/photos-videos:/user-files
networks:
- filerun-net
db:
image: tobi312/rpi-mariadb:10.3
container_name: rpi-mariadb
environment:
MYSQL_ROOT_PASSWORD: your_mysql_root_password
MYSQL_USER: your_mysql_username
MYSQL_PASSWORD: your_mysql_password
MYSQL_DATABASE: your_mysql_database
PUID: 1000
PGID: 1000
volumes:
- ./db:/var/lib/mysql
networks:
- filerun-net
tunnel:
container_name: cloudflared-tunnel-filerun
image: cloudflare/cloudflared
restart: unless-stopped
command: tunnel run
environment:
- TUNNEL_TOKEN=
networks:
- filerun-net
networks:
filerun-net:
name: filerun-net
```
Expected ==> it should work fine in both scenarios.
**Environment and versions**
- OS: [e.g. MacOS] Raspberry Pi4
- Architecture: [e.g. AMD, ARM] ARM
- Version: [e.g. 2022.02.0] Lastest PiOS
**Logs and errors**
If applicable, add logs or errors to help explain your problem.
**Additional context**
Add any other context about the problem here.
One more thing, when I'm putting the Raspberry Pi's IP address in the web GUI, it is working find for filerun as well.
I thought a lot on this, can state a solid answer as why this behavior.
Contributor guide
Assessment
This issue has not been assessed yet.