From 86c09d0889ed7c74b2db888c5f2c96dfaf482131 Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Tue, 19 Nov 2024 21:28:50 -0700 Subject: [PATCH] chore: shuffle database around compose files --- .env-example | 6 ------ docker-compose-prod.yml | 16 +--------------- docker-compose.override.yml | 17 +++++++++++++++++ docker-compose.yml | 13 ------------- 4 files changed, 18 insertions(+), 34 deletions(-) delete mode 100644 .env-example diff --git a/.env-example b/.env-example deleted file mode 100644 index b64914b..0000000 --- a/.env-example +++ /dev/null @@ -1,6 +0,0 @@ -# Database Container Env Vars -MARIADB_DATABASE=glass -MARIADB_ROOT_PASSWORD=password -MARIADB_USER=glass -MARIADB_PASSWORD=password -MARIADB_AUTO_UPGRADE=1 diff --git a/docker-compose-prod.yml b/docker-compose-prod.yml index 8084f9a..77a0a69 100644 --- a/docker-compose-prod.yml +++ b/docker-compose-prod.yml @@ -5,7 +5,7 @@ services: PROD: true ports: - 8140:80 - mem_limit: '512m' + mem_limit: '1024m' healthcheck: test: ['CMD', 'curl', '--silent', '--output', '/dev/null', '--show-error', '--fail', 'http://localhost/up'] start_period: 10s @@ -13,19 +13,5 @@ services: interval: 30s timeout: 10s retries: 3 - depends_on: - glass-db: - condition: service_healthy volumes: - ./src/storage/app/public:/var/www/html/public/storage - glass-db: - mem_limit: '768m' - healthcheck: - test: - ['CMD', 'mariadb', '-u${MARIADB_USER}', '-p${MARIADB_PASSWORD}', '-D${MARIADB_DATABASE}', '-e', 'show tables;'] - # Need to account for upgrade times at startup - start_period: 30s - start_interval: 1s - interval: 30s - timeout: 10s - retries: 3 diff --git a/docker-compose.override.yml b/docker-compose.override.yml index d4186a0..dadc461 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -10,6 +10,23 @@ services: condition: service_started volumes: - ./src:/var/www/html + glass-db: + image: 'mariadb:11.4.3' + restart: always + volumes: + - glass-db:/var/lib/mysql + environment: + MARIADB_DATABASE: glass + MARIADB_ROOT_PASSWORD: password + MARIADB_USER: glass + MARIADB_PASSWORD: password + MARIADB_AUTO_UPGRADE: 1 + networks: + - glass + +volumes: + glass-db: + name: glass-db networks: traefik: diff --git a/docker-compose.yml b/docker-compose.yml index 91027bf..589a6b4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,19 +7,6 @@ services: - glass env_file: - src/.env - glass-db: - image: 'mariadb:11.4.3' - restart: always - volumes: - - database-data:/var/lib/mysql - env_file: - - .env - networks: - - glass - -volumes: - database-data: - driver: local networks: glass: