-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstart.sh
executable file
·34 lines (24 loc) · 1.04 KB
/
start.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env bash
# Spin up docker
docker compose up -d
# If we have compiled assets, then this script has been ran at least once, therefore we shall skip these setup steps
if [ ! -f ./plugins/jaxwilko/game/assets/client.js ]; then
# Run composer install
docker compose exec -u www-data web composer install
# Run mix build
docker compose exec -u www-data web npm i
# Generate app-key
docker compose exec -u www-data web php artisan key:generate
# Create db file
touch storage/database.sqlite
# Migrate database
docker compose exec -u www-data web php artisan migrate
# Overwrite admin password
docker compose exec -u www-data web php artisan winter:passwd admin admin
# Compile game assets
docker compose exec -u www-data web php artisan mix:compile -f -p jaxwilko.game
# Publish images to application media to allow for user overwriting
docker compose exec -u www-data web php artisan game:publish
fi
# Run game
docker compose exec -u www-data web php artisan game:serve -f -m demo