From 0d4bf01b8568f38454f16e8f1de1e31751afa652 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Sun, 4 May 2025 16:08:36 -0400 Subject: Using environment variables for database, removed unnecessary things on the start script --- compose.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'compose.yml') diff --git a/compose.yml b/compose.yml index 285c66c..2ff4edd 100644 --- a/compose.yml +++ b/compose.yml @@ -4,11 +4,12 @@ services: volumes: - db:/var/lib/mysql restart: unless-stopped + env_file: + - .env environment: - MARIADB_USER: fsoserver - MARIADB_PASSWORD: password - MARIADB_DATABASE: fso - MARIADB_ROOT_PASSWORD: wordpass + MARIADB_USER: ${DB_USERNAME} + MARIADB_PASSWORD: ${DB_PASSWORD} + MARIADB_DATABASE: ${DB_NAME} ports: - 3306:3306 networks: @@ -21,7 +22,7 @@ services: - ./game:/app/game - ./nfs:/app/nfs - ./vars:/app/vars - restart: unless-stopped + restart: on-failure depends_on: - db ports: @@ -39,6 +40,7 @@ services: volumes: - ./auth/.env:/app/.env - ./auth/database.db:/app/database.db + restart: unless-stopped ports: - "127.0.0.1:3000:3000" networks: -- cgit v1.2.3