yaskm deployment
This commit is contained in:
parent
0886c1b273
commit
86ba49fa0e
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
.env
|
||||
data
|
||||
config.yml
|
11
config.yml.example
Normal file
11
config.yml.example
Normal file
@ -0,0 +1,11 @@
|
||||
---
|
||||
listen:
|
||||
address: 0.0.0.0
|
||||
port: 80
|
||||
|
||||
db:
|
||||
host: mariadb
|
||||
port: 3306
|
||||
username: yaskm
|
||||
password: P4ssw0rd!
|
||||
database: yaskm
|
43
docker-compose.yml
Normal file
43
docker-compose.yml
Normal file
@ -0,0 +1,43 @@
|
||||
---
|
||||
services:
|
||||
yaskm:
|
||||
image: ${YASKM_REGISTRY}/yaskm:${YASKM_VERSION}
|
||||
restart: unless-stopped
|
||||
labels:
|
||||
- traefik.enable=${TRAEFIK_ENABLED}
|
||||
- traefik.docker.network=${TRAEFIK_NETWORK}
|
||||
### Section HTTP
|
||||
- traefik.http.routers.http-${TRAEFIK_ROUTER}.entrypoints=http
|
||||
# redirect to HTTPS only
|
||||
- traefik.http.routers.http-${TRAEFIK_ROUTER}.middlewares=http-to-https
|
||||
- traefik.http.routers.http-${TRAEFIK_ROUTER}.rule=${TRAEFIK_MATCHRULE}
|
||||
### Section HTTPS
|
||||
- traefik.http.routers.https-${TRAEFIK_ROUTER}.entrypoints=https
|
||||
# configure the exposed service
|
||||
- traefik.http.routers.https-${TRAEFIK_ROUTER}.rule=${TRAEFIK_MATCHRULE}
|
||||
# of course, enable TLS and it's certificate provider
|
||||
- traefik.http.routers.https-${TRAEFIK_ROUTER}.tls=${TRAEFIK_TLSENABLED}
|
||||
- traefik.http.routers.https-${TRAEFIK_ROUTER}.tls.certresolver=${TRAEFIK_CERTRESOLVER}
|
||||
# specify a service so a custom port can be used
|
||||
- traefik.http.services.${TRAEFIK_SERVICE}.loadbalancer.server.port=${TRAEFIK_SERVICE_PORT}
|
||||
networks:
|
||||
- internal
|
||||
- traefik
|
||||
volumes:
|
||||
- ./config.yml:/config.yml
|
||||
mariadb:
|
||||
image: docker.io/mariadb:${MARIADB_VERSION}
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- MARIADB_ROOT_PASSWORD=${MARIADB_ROOT_PASSWORD}
|
||||
- MARIADB_USER=${MARIADB_USER}
|
||||
- MARIADB_PASSWORD=${MARIADB_PASSWORD}
|
||||
- MARIADB_DATABASE=${MARIADB_DATABASE}
|
||||
volumes:
|
||||
- ${MARIADB_DATA}:/var/lib/mysql
|
||||
|
||||
networks:
|
||||
internal:
|
||||
traefik:
|
||||
external: true
|
||||
name: ${TRAEFIK_NETWORK}
|
21
env.example
Normal file
21
env.example
Normal file
@ -0,0 +1,21 @@
|
||||
# Træfik
|
||||
TRAEFIK_ENABLED=true
|
||||
TRAEFIK_CERTRESOLVER=letsencrypt
|
||||
TRAEFIK_NETWORK=traefik
|
||||
TRAEFIK_MATCHRULE=Host(`yaskm.example.com`)
|
||||
TRAEFIK_ROUTER=yaksm_example_com
|
||||
TRAEFIK_SERVICE=yaksm_example_com
|
||||
TRAEFIK_SERVICE_PORT=80
|
||||
TRAEFIK_TLSENABLED=true
|
||||
|
||||
# YAKSM
|
||||
YASKM_REGISTRY=git.bjphoster.com/source
|
||||
YASKM_VERSION=latest
|
||||
|
||||
# MariaDB
|
||||
MARIADB_VERSION=latest
|
||||
MARIADB_DATA=./data
|
||||
MARIADB_ROOT_PASSWORD=r00t
|
||||
MARIADB_DATABASE=yaskm
|
||||
MARIADB_USER=yaskm
|
||||
MARIADB_PASSWORD=P4ssw0rd!
|
Loading…
Reference in New Issue
Block a user