Merge pull request 'Add image building and migration testing instructions to README.' (#1) from Tr0n/web:docs/build into master

Reviewed-on: #1
This commit is contained in:
Exynox 2025-01-12 16:52:25 +02:00
commit bd124db2ed

View File

@ -1,12 +1,15 @@
# The Metin2 Website # The Metin2 Website
This is a replica of the old Metin2 website in the pre-2014 era, made in Laravel. Still very much a work in progress, This is a replica of the old Metin2 website in the pre-2014 era, made in Laravel. Still very much a work in progress,
it aims to be the management centre for the Metin2 stack. it aims to be the management centre for the Metin2 stack.
## What works ## What works
- Registering a new account - Registering a new account
- Account login - Account login
## What's unfinished ## What's unfinished
- User management - User management
- Complete multilanguage system & English translations - Complete multilanguage system & English translations
- Item-Shop with Stripe integration - Item-Shop with Stripe integration
@ -16,3 +19,32 @@ ## What's unfinished
- Ranking (with cache system for fast search) - Ranking (with cache system for fast search)
- Adding Grotto & DC landing pages - Adding Grotto & DC landing pages
- Converting Flash-based media players to HTML5. - Converting Flash-based media players to HTML5.
## Development
### Image Building
To build the image, checkout the repo and run either of the following build statements
```shell
docker build -t metin2/web:test -f docker/image/prod/apache.Dockerfile .
# or
docker build -t metin2/web:test -f docker/image/prod/frankenphp.Dockerfile .
```
If you want to use this image in your deploy project, ensure to update the `WEB_IMAGE` variable in your `.env` to `metin2/web:test`.
### Testing Migrations
To test newly added migrations, use a temporary docker container that attaches to your existing deploy network.
```shell
docker run --env-file .env --network deploy_default --rm metin2/web:test "php artisan migrate"
```
Ensure that the rollback of your migration is also working as expected.
Adapt the `--step` parameter according to the number of migration files you added.
```shell
docker run --env-file .env --network deploy_default --rm metin2/web:test "php artisan migrate:rollback --step=1"
```