Initial configuration

This commit is contained in:
3wc 2021-03-02 18:35:05 +02:00
parent 79ca471a8e
commit eeb3786b7c
2 changed files with 48 additions and 7 deletions

View File

@ -4,3 +4,5 @@ DOMAIN=filerun.example.com
## Domain aliases
#EXTRA_DOMAINS=', `www.filerun.example.com`'
LETS_ENCRYPT_ENV=production
SECRET_DB_ROOT_PASSWORD_VERSION=v1

View File

@ -3,9 +3,25 @@ version: "3.8"
services:
app:
image: nginx:1.19.2
image: afian/filerun
networks:
- internal
- proxy
environment:
FR_DB_HOST: db
FR_DB_PORT: 3306
FR_DB_NAME: filerun
FR_DB_USER: filerun
FR_DB_PASS: "circa5link7habit!convoy"
APACHE_RUN_USER: www-data
APACHE_RUN_USER_ID: 33
APACHE_RUN_GROUP: www-data
APACHE_RUN_GROUP_ID: 33
depends_on:
- db
volumes:
- filerun_html:/var/www/html
- filerun_files:/user-files
deploy:
restart_policy:
condition: on-failure
@ -19,13 +35,36 @@ services:
#- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirect"
#- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLForceHost=true"
#- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost"]
interval: 30s
timeout: 10s
retries: 10
start_period: 1m
db:
image: "mariadb:10.5"
command: |
mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
environment:
- MYSQL_DATABASE=filerun
- MYSQL_USER=filerun
- "MYSQL_PASSWORD=circa5link7habit!convoy"
#- MYSQL_PASSWORD_FILE=/run/secrets/db_password
- MYSQL_ROOT_PASSWORD_FILE=/run/secrets/db_root_password
secrets:
#- db_passwowd
- db_root_password
volumes:
- "mariadb:/var/lib/mysql"
networks:
- internal
networks:
internal:
proxy:
external: true
volumes:
mariadb:
filerun_html:
filerun_files:
secrets:
db_root_password:
name: ${STACK_NAME}_db_root_password_${SECRET_DB_ROOT_PASSWORD_VERSION}
external: true