Skip to content

Instantly share code, notes, and snippets.

@t3easy
Created January 13, 2020 08:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save t3easy/6a8924261e390972d54901af6736c1d5 to your computer and use it in GitHub Desktop.
Save t3easy/6a8924261e390972d54901af6736c1d5 to your computer and use it in GitHub Desktop.
Snipe-it docker-compose stack
SNIPE_IT_VERSION=4.7.8
VHOST=assets.domain.tld
FRONTEND_NETWORK=frontend
# Mysql Parameters
MYSQL_PORT_3306_TCP_ADDR=db
MYSQL_PORT_3306_TCP_PORT=3306
MYSQL_ROOT_PASSWORD=YOUR_SUPER_SECRET_PASSWORD
MYSQL_DATABASE=snipeit
MYSQL_USER=snipeit
MYSQL_PASSWORD=YOUR_snipeit_USER_PASSWORD
# Email Parameters
# - the hostname/IP address of your mailserver
MAIL_PORT_587_TCP_ADDR=
#the port for the mailserver (probably 587, could be another)
MAIL_PORT_587_TCP_PORT=587
# the default from address, and from name for emails
MAIL_ENV_FROM_ADDR=
MAIL_ENV_FROM_NAME=IT Assets
# - pick 'tls' for SMTP-over-SSL, 'tcp' for unencrypted
MAIL_ENV_ENCRYPTION=tls
# SMTP username and password
MAIL_ENV_USERNAME=your_email_username
MAIL_ENV_PASSWORD=your_email_password
# Snipe-IT Settings
APP_ENV=production
APP_DEBUG=false
APP_KEY=<<Fill in Later!>>
APP_URL=http://127.0.0.1:80
APP_TIMEZONE=Europe/Berlin
APP_LOCALE=de
version: '3.5'
services:
db:
restart: always
environment:
MYSQL_ROOT_PASSWORD:
MYSQL_PASSWORD:
app:
restart: always
environment:
MYSQL_ROOT_PASSWORD:
MYSQL_PASSWORD:
APP_KEY:
MAIL_ENV_USERNAME:
MAIL_ENV_PASSWORD:
version: '3.5'
services:
db:
image: mariadb:10.1
env_file:
- .env.snipe-it
volumes:
- db:/var/lib/mysql
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --default-authentication-plugin=mysql_native_password
networks:
app-db:
app:
image: ${CI_REGISTRY_IMAGE}/snipe-it:${SNIPE_IT_VERSION}
env_file:
- .env.snipe-it
volumes:
- snipeit:/var/lib/snipeit
build:
context: .
args:
SNIPE_IT_VERSION:
depends_on:
- db
networks:
app-db:
frontend:
labels:
traefik.enable: "true"
traefik.docker.network: ${FRONTEND_NETWORK}
traefik.frontend.rule: Host:${VHOST}
volumes:
db:
snipeit:
networks:
app-db:
frontend:
external: true
name: ${FRONTEND_NETWORK}
ARG SNIPE_IT_VERSION
FROM snipe/snipe-it:v${SNIPE_IT_VERSION}
COPY --from=registry.domain.tld/ca-certificates:latest /usr/local/share/ca-certificates/*.crt /usr/local/share/ca-certificates/
RUN update-ca-certificates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment