Document image building and migration testing
This commit is contained in:
parent
e825992d58
commit
1f0af1f800
26
README.md
26
README.md
@ -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
|
||||||
@ -19,8 +22,29 @@ ## What's unfinished
|
|||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|
||||||
To build the image, checkout the repo and run
|
### Image Building
|
||||||
|
|
||||||
|
To build the image, checkout the repo and run either of the following build statements
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
docker build -t metin2/web:test -f docker/image/prod/apache.Dockerfile .
|
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"
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user