-
I'm trying to use the I'm using the following compose file: version: '3.1'
services:
yourls:
container_name: yourls
hostname: yourls
image: yourls:fpm-alpine
# ports:
# - 8080:80
environment:
- "YOURLS_DB_PASS=[redacted]"
- "YOURLS_SITE=test.goose.ws"
- "YOURLS_USER=goose"
- "YOURLS_PASS=[redacted]"
volumes:
- "/etc/localtime:/etc/localtime:ro"
restart: unless-stopped
labels:
- "com.ouroboros.enable=true"
logging:
driver: json-file
options:
max-file: "3"
max-size: "10M"
network_mode: BucketNet
mysql:
container_name: mysql
hostname: mysql
image: mysql:latest
environment:
- "MYSQL_ROOT_PASSWORD=[redacted]"
- "MYSQL_DATABASE=yourls"
volumes:
- "/etc/localtime:/etc/localtime:ro"
restart: unless-stopped
labels:
- "com.ouroboros.enable=true"
logging:
driver: json-file
options:
max-file: "3"
max-size: "10M"
network_mode: BucketNet I have the port commented out because I'm reverse proxying to the container from a separate nginx container on the same
server {
listen 80;
listen [::]:80;
server_name test.goose.ws;
root /var/www/test.goose.ws;
access_log /var/log/nginx/test.access.log;
error_log /var/log/nginx/test.error.log;
location / {
return 301 https://test.goose.ws$request_uri;
}
location /.well-known/ {
allow all;
}
}
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name test.goose.ws;
root /var/www/test.goose.ws;
ssl_certificate /etc/letsencrypt/live/test.goose.ws/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/test.goose.ws/privkey.pem;
access_log /var/log/nginx/test.access.log;
error_log /var/log/nginx/test.error.log;
location / {
include proxy.conf;
resolver 127.0.0.11 valid=30s;
set $upstream_app yourls;
set $upstream_port 80;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
}
location /.well-known/ {
allow all;
}
} The containers launch well:
However, when I try to go to the admin page, I'm greeted with a bad gateway error: It seems like an issue inside the container, if I bypass the reverse proxy and directly connect to the container IP, it still fails to connect to the httpd:
For what it's worth, the
Any suggestions on where I may have gone wrong? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Hard to tell without a view on how |
Beta Was this translation helpful? Give feedback.
-
I'm using the latest tag but the same issue happened to me. It seems that yourls can't connect to db |
Beta Was this translation helpful? Give feedback.
Hard to tell without a view on how
BucketNet
network is configured.Plus, why is it setup as
network_mode:
and not asnetworks: []
?