Move to Traefik

This commit is contained in:
Tom Wiesing 2022-10-07 19:46:14 +02:00
parent bf57c0d5a6
commit 471ccbadc5
No known key found for this signature in database
36 changed files with 200 additions and 190 deletions

View file

@ -0,0 +1,2 @@
DOCKER_NETWORK_NAME=${DOCKER_NETWORK_NAME}
HTTPS_ENABLED=${HTTPS_ENABLED}

View file

@ -35,6 +35,7 @@ func (*SQL) Context(parent component.InstallationContext) component.Installation
}
//go:embed all:sql
//go:embed sql.env
var resources embed.FS
func (sql *SQL) Stack(env environment.Environment) component.StackWithResources {
@ -42,6 +43,12 @@ func (sql *SQL) Stack(env environment.Environment) component.StackWithResources
Resources: resources,
ContextPath: "sql",
EnvPath: "sql.env",
EnvContext: map[string]string{
"DOCKER_NETWORK_NAME": sql.Config.DockerNetworkName,
"HTTPS_ENABLED": sql.Config.HTTPSEnabledEnv(),
},
MakeDirsPerm: environment.DefaultDirPerm,
MakeDirs: []string{
"data",

View file

@ -7,6 +7,8 @@ services:
- "./data/:/var/lib/mysql"
ports:
- 127.0.0.1:3306:3306
labels:
- "eu.wiss-ki.barrel.distillery=${DOCKER_NETWORK_NAME}"
environment:
# This combination of environment variables will configure a passwordless root user
# that can only connect to the container from 'localhost'.
@ -24,6 +26,8 @@ services:
# By default no admin account is created, so initial shell access to make one is needed.
ports:
- 127.0.0.1:8080:80
labels:
- "eu.wiss-ki.barrel.distillery=${DOCKER_NETWORK_NAME}"
depends_on:
- sql
restart: always
@ -31,5 +35,5 @@ services:
networks:
default:
name: distillery
name: ${DOCKER_NETWORK_NAME}
external: true