Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: Remove need for seeding mariadb with .sql files, since the ASP install module works #17

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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