Skip to content

Commit

Permalink
Merge pull request #17 from startersclan/fix/fix-link-to-install-modu…
Browse files Browse the repository at this point in the history
…le-when-unable-to-establish-a-database-connection-on-the-first-run

Enhancement: Remove need for seeding `mariadb` with .sql files, since the ASP install module works
  • Loading branch information
leojonathanoh authored Sep 29, 2022
2 parents 2be5db9 + d24388d commit cb011ca
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 7 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ See [docker-compose.example.yml](docker-compose.example.yml) example showing how
Notes:
- Mount the [`config.php`](./config/ASP/config.php) with write permissions, or else `ASP` dashboard will throw an error. Use `System > Edit Configuration` as reference to customize the config file.
- Optional: Mount your customized [`armyAbbreviationMap.php`](./config/ASP/armyAbbreviationMap.php), [`backendAwards.php`](./config/ASP/backendAwards.php), and [`ranks.php`](./config/ASP/ranks.php) config files if you are using a customized mod. Unlike `config.php`, they don't need write permissions.
- Seed the `db` service with `schema.sql` and `data.sql` so that the database is populated on the first run. The `System > System Installation` doesn't need to be used.
- [Backup the DB](#development) using `mysqldump` instead of the ASP. `System > Backup Stats Database` will not be allowed since the DB is on remote host. This means there is no need for provisioning a `backups-volume` volume.
- Optional: For better security, define `MARIADB_USER` and `MARIADB_PASSWORD` for the `db` service, so that a regular `mariadb` user is created on the first run, instead of using the `root` user. Note that this hasn't been tested, but it seems to work nicely, although it might break some modules in the `ASP` dashboard if they ruly on `root` privileges (any?).

Expand Down
3 changes: 0 additions & 3 deletions docker-compose.example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,6 @@ services:
# - MARIADB_PASSWORD=mypassword # Uncomment this if you want to create a regular user
- MARIADB_DATABASE=bf2stats
volumes:
# Seed the database on the first run. No need to use the ASP dashboard's installer. Note that the .sql file are executed in alphabetical order of their names.
- ./src/ASP/system/sql/schema.sql:/docker-entrypoint-initdb.d/01-schema.sql:ro
- ./src/ASP/system/sql/data.sql:/docker-entrypoint-initdb.d/02-data.sql:ro
- db-volume:/var/lib/mysql
networks:
- default
Expand Down
3 changes: 0 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,6 @@ services:
# - MARIADB_PASSWORD=mypassword # Uncomment this if you want to create a regular user
- MARIADB_DATABASE=bf2stats
volumes:
# Seed the database on the first run. No need to use the ASP dashboard's installer. Note that the .sql file are executed in alphabetical order of their names.
- ./src/ASP/system/sql/schema.sql:/docker-entrypoint-initdb.d/01-schema.sql:ro
- ./src/ASP/system/sql/data.sql:/docker-entrypoint-initdb.d/02-data.sql:ro
- db-volume:/var/lib/mysql
networks:
- default
Expand Down

0 comments on commit cb011ca

Please sign in to comment.