Help Installing with Docker - especially behind an nginx reverse proxy #17146
Unanswered
ardentmusician
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Can anyone assist with getting snipeit to install with Docker? The instructions on the snipe-it website are just wrong, none of the commands actually work, and I can't get snipeit it to connect.
I have reinstalled it several times, but I have managed to get it to respond exactly once - then it immediately redirected me to the FQDN and port, which did not work, since it is sending it back through the nginx proxy with the wrong port.
I have tried setting it up with completely different ports (80 is not available, so I have tried 8000 and 8118), and I just get 504 gateway timeout. I have tried setting the .env to use the internal DNS name of the server it is on, bypassing the reverse proxy, and I get "refused to connect". I have tried setting the .env to use the IP address, same issue. No matter what settings I use, I cannot connect to snipeit. So far, my entire experience with snipeit is nothing but days of frustration.
This is what the BASIC APP SETTINGS look like in the .env file:
--------------------------------------------
REQUIRED: DOCKER SPECIFIC SETTINGS
--------------------------------------------
APP_VERSION=
APP_PORT=8118
--------------------------------------------
REQUIRED: BASIC APP SETTINGS
--------------------------------------------
APP_ENV=production
APP_DEBUG=false
Please regenerate the APP_KEY value by calling
docker compose run --rm app php artisan key:generate --show
. Copy paste the value hereAPP_KEY=
APP_URL=http://192.168.0.100:8118
https://en.wikipedia.org/wiki/List_of_tz_database_time_zones - TZ identifier
APP_TIMEZONE='America/Los_Angeles'
APP_LOCALE=en-US
MAX_RESULTS=500
This is the docker-compose.yml file (I had to comment out the restart line, as it would not launch the container AT ALL if that line was there):
Compose file for production.
volumes:
db_data:
storage:
services:
app:
image: snipe/snipe-it:${APP_VERSION:-latest}
restart: unless-stopped
volumes:
- storage:/var/lib/snipeit
ports:
- "${APP_PORT:-8118}:80"
depends_on:
db:
condition: service_healthy
restart: true
db:
image: mariadb:11.4.7
restart: unless-stopped
volumes:
- db_data:/var/lib/mysql
environment:
MYSQL_DATABASE: ${DB_DATABASE}
MYSQL_USER: ${DB_USERNAME}
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
healthcheck:
# https://mariadb.com/kb/en/using-healthcheck-sh/#compose-file-example
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
interval: 5s
timeout: 1s
retries: 5
Does anyone have any ideas?
Beta Was this translation helpful? Give feedback.
All reactions