Hybes
September 30, 2023, 6:43pm
1
Hiya, I’ve been self hosting as a docker stack for a couple months. I had a routine upgrade and repulled the images. Not certain of the versions before and after, but now, no matter what, I can’t get port 9000 open on the app service. And im getting 500 errors fro, nginx and can no longer access the Web UI. However, auto emails still seem to be going out.
hillel
September 30, 2023, 7:27pm
2
Hi,
Are there any details about the 500 error in storage/logs or the web server error logs?
Hybes
October 2, 2023, 8:07am
3
hillel
October 2, 2023, 8:16am
4
Maybe the info here will help:
opened 11:51AM - 27 Jan 17 UTC
closed 11:48AM - 28 Feb 17 UTC
Hey Folks,
I'm a bit of a blockhead just now. I try to setup invoice ninja al… ong with an nginx-proxy from jwilder with docker-compose. No matter what I do, I get the following error:
```
[error] 6#6: *1 connect() failed (111: Connection refused) while connecting to upstream, client: XXX.XX.X.X, server: application, request: "GET / HTTP/1.1", upstream: "fastcgi://XXX.XX.X.X:9000", host: "domain.tld"
```
Do you guys have an Idea?
This is my docker-compose.yml:
```
version: '3'
volumes:
invoice-db-data:
driver: local-persist
driver_opts:
mountpoint: ${CONTAINERVOLUME}/var/lib/mysql
invoice-app-data:
driver: local-persist
driver_opts:
mountpoint: ${CONTAINERVOLUME}/var/www/app
services:
database:
image: mysql
restart: unless-stopped
volumes:
- invoice-db-data:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
webserver:
image: nginx
restart: unless-stopped
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
- invoice-app-data:/var/www/app
environment:
- VIRTUAL_HOST=${VIRTUAL_HOST}
- VIRTUAL_PROTO=http
- VIRTUAL_PORT=80
- LETSENCRYPT_HOST=${LETSENCRYPT_HOST}
- LETSENCRYPT_EMAIL=${LETSENCRYPT_EMAIL}
ports:
- ${PROXYPORT}:80
networks:
- nginxproxy
- default
application:
image: invoiceninja/invoiceninja
restart: unless-stopped
environment:
- APP_DEBUG=1
- APP_URL=http://${VIRTUAL_HOST}
- DB_HOST=database
- DB_DATABASE=${MYSQL_DATABASE}
- DB_USERNAME=${MYSQL_USER}
- DB_PASSWORD=${MYSQL_PASSWORD}
depends_on:
- database
- webserver
volumes:
- invoice-app-data:/var/www/app
cron:
image: invoiceninja/invoiceninja
restart: unless-stopped
user: www-data
environment:
- APP_DEBUG=1
- DB_HOST=database
- DB_DATABASE=${MYSQL_DATABASE}
- DB_USERNAME=${MYSQL_USER}
- DB_PASSWORD=${MYSQL_PASSWORD}
depends_on:
- database
- webserver
- application
entrypoint: |
bash -c 'bash -s <<EOF
trap "break;exit" SIGHUP SIGINT SIGTERM
sleep 300s
while /bin/true; do
DB_USERNAME=${MYSQL_USER} DB_PASSWORD=${MYSQL_PASSWORD} /usr/local/bin/php /var/www/app/artisan ninja:send-invoices
DB_USERNAME=${MYSQL_USER} DB_PASSWORD=${MYSQL_PASSWORD} /usr/local/bin/php /var/www/app/artisan ninja:send-reminders
sleep 1d
done
EOF'
networks:
nginxproxy:
external:
name: ${NGINXPROXYNETWORK}
```
My nginx.conf:
```
user www-data;
events {
worker_connections 768;
}
http {
upstream backend {
server application:9000;
}
include /etc/nginx/mime.types;
default_type application/octet-stream;
gzip on;
gzip_disable "msie6";
server {
listen 80 default;
server_name application;
root /var/www/app/public;
index index.php;
charset utf-8;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
sendfile off;
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass backend;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_intercept_errors off;
fastcgi_buffer_size 16k;
fastcgi_buffers 4 16k;
}
location ~ /\.ht {
deny all;
}
}
}
```
Hybes
October 2, 2023, 8:21am
5
thanks, but this was working before, and I can access the services through the network inside the docker container.
also i’ve checked, and there are no duplicate hostnames on the network.
hillel
October 2, 2023, 8:35am
6
Sorry, I’m not sure. You may want to post an issue on the GitHub repo.
Hybes
October 2, 2023, 12:16pm
7