Skip to content

Bump larastan/larastan from 2.9.10 to 3.0.2 #738

Bump larastan/larastan from 2.9.10 to 3.0.2

Bump larastan/larastan from 2.9.10 to 3.0.2 #738

name: Docker Compose Production Build
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
test-docker:
runs-on: ubuntu-latest
services:
docker:
image: docker:26.0.0
options: --privileged
steps:
- uses: actions/checkout@v2
- name: Modify Dockerfile to disable USER www (which is not supported by GitHub Actions, as it runs as root)
run: |
sed -i '/USER www/s/^/#/' ./Dockerfile
- name: Set up Docker Compose
run: |
# Build the images and start the services
docker compose -f docker-compose.prod.yml up -d
# Ensure the database is ready
docker compose exec -T ogame-db bash -c 'until mariadb -h "ogame-db" -u "root" -p"toor" -e "SELECT 1"; do sleep 1; done'
- name: Set Permissions
run: docker compose exec -T ogame-app chmod -R 777 /var/www
- name: Copy .env
run: docker compose exec -T ogame-app cp .env.example-prod .env
- name: Run Laravel setup commands
run: |
docker compose exec -T ogame-app composer install --no-dev
docker compose exec -T ogame-app php artisan key:generate
- name: Run DB Migrations
run: docker compose exec -T ogame-app php artisan migrate --force
- name: Run configuration cache commands
run: docker compose exec -T ogame-app php artisan cache:clear && docker compose exec -T ogame-app php artisan config:cache && docker compose exec -T ogame-app php artisan route:cache && docker compose exec -T ogame-app php artisan view:cache