From 0d497d58eef4d171d3ba12f9215744c47cd3147c Mon Sep 17 00:00:00 2001 From: LinuxServer-CI Date: Fri, 4 Mar 2022 10:02:21 +0100 Subject: [PATCH] Bot Updating Documentation --- images/docker-snipe-it.md | 119 ++++++++++++++++++-------------------- 1 file changed, 57 insertions(+), 62 deletions(-) diff --git a/images/docker-snipe-it.md b/images/docker-snipe-it.md index 67d43b892..c62310c14 100644 --- a/images/docker-snipe-it.md +++ b/images/docker-snipe-it.md @@ -36,6 +36,42 @@ The architectures supported by this image are: ## Application Setup Access the webui at `:8080`, for more information check out [Snipe-it](https://github.com/snipe/snipe-it). +**This container requires a MySQL or MariaDB server to connect to, we reccomend [ours](https://github.com/linuxserver/docker-mariadb)** + +This container also generates an SSL certificate and stores it in +``` +/config/keys/cert.crt +/config/keys/key.crt +``` +To use your own certificate swap these files with yours. To use SSL forward your port to 443 inside the container IE: + +``` +-p 443:443 +``` + +The application accepts a series of environment variables to further customize itself on boot: + +| Parameter | Function | +| :---: | --- | +| `-e APP_ENV=` | Default is production but can use testing or develop| +| `-e APP_DEBUG=` | Set to true to see debugging output in the web UI| +| `-e APP_LOCALE=` | Default is en set to the language preferred full list [here](https://snipe-it.readme.io/docs/configuration#section-setting-a-language)| +| `-e MAIL_PORT_587_TCP_ADDR=` | SMTP mailserver ip or hostname| +| `-e MAIL_PORT_587_TCP_PORT=` | SMTP mailserver port| +| `-e MAIL_ENV_FROM_ADDR=` | The email address mail should be replied to and listed when sent| +| `-e MAIL_ENV_FROM_NAME=` | The name listed on email sent from the default account on the system| +| `-e MAIL_ENV_ENCRYPTION=` | Mail encryption to use IE tls | +| `-e MAIL_ENV_USERNAME=` | SMTP server login username| +| `-e MAIL_ENV_PASSWORD=` | SMTP server login password| + +### PHP customization + +This image uses our NGINX base image all configuration files for PHP and NGINX are located in `/config/php`. To overide any defaults please modify `/config/php/php-local.ini` IE for upload size: + +``` +upload_max_filesize = 16 +post_max_size = 16M +``` ## Usage @@ -44,42 +80,27 @@ To help you get started creating a container from this image you can either use ### docker-compose (recommended, [click here for more info](https://docs.linuxserver.io/general/docker-compose)) ```yaml -version: "3" +--- +version: "2.1" services: - mysql: - image: linuxserver/mariadb - container_name: snipe_mysql - restart: always - volumes: - - :/config - environment: - - PUID=1000 - - PGID=1000 - - TZ=Europe/London - - MYSQL_ROOT_PASSWORD= - - MYSQL_USER=snipe - - MYSQL_PASSWORD= - - MYSQL_DATABASE=snipe - snipeit: - image: linuxserver/snipe-it:latest + snipe-it: + image: lscr.io/linuxserver/snipe-it container_name: snipe-it - restart: always - depends_on: - - mysql - volumes: - - :/config environment: - - NGINX_APP_URL=< your application URL IE 192.168.10.1:8080> - - MYSQL_PORT_3306_TCP_ADDR=mysql - - MYSQL_PORT_3306_TCP_PORT=3306 - - MYSQL_DATABASE=snipe - - MYSQL_USER=snipe - - MYSQL_PASSWORD= - - PGID=1000 - PUID=1000 + - PGID=1000 + - APP_URL=http://localhost:8080 + - MYSQL_PORT_3306_TCP_ADDR= + - MYSQL_PORT_3306_TCP_PORT= + - MYSQL_DATABASE= + - MYSQL_USER= + - MYSQL_PASSWORD=changeme + - TZ=US/Pacific + volumes: + - :/config ports: - - "8080:80" - + - 8080:80 + restart: unless-stopped ``` ### docker cli ([click here for more info](https://docs.docker.com/engine/reference/commandline/cli/)) @@ -89,12 +110,13 @@ docker run -d \ --name=snipe-it \ -e PUID=1000 \ -e PGID=1000 \ - -e NGINX_APP_URL= \ + -e APP_URL=http://localhost:8080 \ -e MYSQL_PORT_3306_TCP_ADDR= \ -e MYSQL_PORT_3306_TCP_PORT= \ -e MYSQL_DATABASE= \ -e MYSQL_USER= \ -e MYSQL_PASSWORD=changeme \ + -e TZ=US/Pacific \ -p 8080:80 \ -v :/config \ --restart unless-stopped \ @@ -117,12 +139,13 @@ Docker images are configured using parameters passed at runtime (such as those a | :----: | --- | | `PUID=1000` | for UserID - see below for explanation | | `PGID=1000` | for GroupID - see below for explanation | -| `NGINX_APP_URL=` | Hostname or IP and port if applicable IE :8080 | +| `APP_URL=http://localhost:8080` | Hostname or IP and port if applicable, be sure to define https/http | | `MYSQL_PORT_3306_TCP_ADDR=` | Mysql hostname or IP to use | | `MYSQL_PORT_3306_TCP_PORT=` | Mysql port to use | | `MYSQL_DATABASE=` | Mysql database to use | | `MYSQL_USER=` | Mysql user to use | | `MYSQL_PASSWORD=changeme` | Mysql password to use | +| `TZ=US/Pacific` | Specify a timezone to use EG Europe/London, this is required to run snipe-it | ### Volume Mappings (`-v`) @@ -152,35 +175,6 @@ Will set the environment variable `PASSWORD` based on the contents of the `/run/ For all of our images we provide the ability to override the default umask settings for services started within the containers using the optional `-e UMASK=022` setting. Keep in mind umask is not chmod it subtracts from permissions based on it's value it does not add. Please read up [here](https://en.wikipedia.org/wiki/Umask) before asking for support. -## Optional Parameters - -This container also generates an SSL certificate and stores it in -``` -/config/keys/cert.crt -/config/keys/key.crt -``` -To use your own certificate swap these files with yours. To use SSL forward your port to 443 inside the container IE: - -``` --p 443:443 -``` - -The application accepts a series of environment variables to further customize itself on boot: - -| Parameter | Function | -| :---: | --- | -| `-e APP_TIMEZONE=` | The timezone the application will use IE US/Pacific| -| `-e APP_ENV=` | Default is production but can use testing or develop| -| `-e APP_DEBUG=` | Set to true to see debugging output in the web UI| -| `-e APP_LOCALE=` | Default is en set to the language preferred full list [here][localesurl]| -| `-e MAIL_PORT_587_TCP_ADDR=` | SMTP mailserver ip or hostname| -| `-e MAIL_PORT_587_TCP_PORT=` | SMTP mailserver port| -| `-e MAIL_ENV_FROM_ADDR=` | The email address mail should be replied to and listed when sent| -| `-e MAIL_ENV_FROM_NAME=` | The name listed on email sent from the default account on the system| -| `-e MAIL_ENV_ENCRYPTION=` | Mail encryption to use IE tls | -| `-e MAIL_ENV_USERNAME=` | SMTP server login username| -| `-e MAIL_ENV_PASSWORD=` | SMTP server login password| - ## User / Group Identifiers When using volumes (`-v` flags), permissions issues can arise between the host OS and the container, we avoid this issue by allowing you to specify the user `PUID` and group `PGID`. @@ -213,6 +207,7 @@ We publish various [Docker Mods](https://github.com/linuxserver/docker-mods) to ## Versions +* **02.03.22:** - Rework init logic, do not show default compose. * **29.06.21:** - Rebasing to alpine 3.14. * **30.04.21:** - Rebasing to alpine 3.13, add artisan migrate on spinup. * **01.06.20:** - Rebasing to alpine 3.12.