Skip to content

Commit 93e1e87

Browse files
committed
improve production makefile
1 parent 034cb66 commit 93e1e87

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

Makefile

+8-2
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,16 @@ actions:
3535

3636
prod:
3737
@docker compose -f ./docker-compose.prod.yml up -d
38+
@docker compose -f ./docker-compose.prod.yml exec -it action bash /app/docker/production/php/init.sh
3839
@docker compose -f ./docker-compose.prod.yml exec -it php bash
3940

40-
download:
41+
prod-down:
42+
@docker compose -f ./docker-compose.prod.yml down
43+
44+
prod-download:
45+
@rm -f Makefile ./image.tar ./steam-buddy.zip ./docker-compose.prod.yml
46+
@rm -rf ./docker
4147
@chmod +x ./docker/production/install.sh
4248
@./docker/production/install.sh
4349

44-
.PHONY: init check-env-file run dev stop node php test fix
50+
.PHONY: init check-env-file run dev stop node php test fix actions prod-down prod-download prod-update

docker/actions/init.sh

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/bin/bash
22

33
cp /app/.env.actions /app/.env
4+
chown -R www-data:www-data /app/storage
45

56
composer install
67

@@ -12,3 +13,4 @@ php artisan migrate
1213
php artisan cache:clear
1314
php artisan config:clear
1415

16+

docker/production/php/init.sh

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
chown -R www-data:www-data /app/storage

0 commit comments

Comments
 (0)