Skip to content

Commit

Permalink
Merge branch 'develop' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
ilumos committed Aug 21, 2024
2 parents 80299ea + 8046669 commit 38d97bd
Show file tree
Hide file tree
Showing 294 changed files with 37,771 additions and 8,439 deletions.
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/.dockerignore
/.editorconfig

/.env*
/public/storage
/.git*
/.idea*
/.phpstorm.meta.php
Expand Down
6 changes: 3 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[*.{yml, yaml}]
[*.{yml,yaml}]
indent_size = 4
52 changes: 34 additions & 18 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,26 @@ APP_NAME=LANager
APP_ENV=production
APP_KEY=base64:
APP_DEBUG=false
APP_URL=http://localhost
APP_TIMEZONE=UTC
APP_LOCALE=en
APP_URL=http://localhost

STEAM_API_KEY=
GOOGLE_API_KEY=

TRUSTED_PROXIES=

APP_LOCALE=en
APP_FALLBACK_LOCALE=en
APP_FAKER_LOCALE=en_GB

APP_MAINTENANCE_DRIVER=file
# APP_MAINTENANCE_STORE=database

BCRYPT_ROUNDS=12

LOG_CHANNEL=stderr
LOG_STACK=single
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug

DB_CONNECTION=mysql
DB_HOST=db
Expand All @@ -17,37 +31,39 @@ DB_USERNAME=lanager
DB_PASSWORD=
DB_ROOT_PASSWORD=

CACHE_DRIVER=file
SESSION_DRIVER=database
SESSION_LIFETIME=7200
LOG_CHANNEL=stdout
SESSION_ENCRYPT=false
SESSION_PATH=/
SESSION_DOMAIN=null

# Unused
BROADCAST_DRIVER=log
QUEUE_CONNECTION=sync
BROADCAST_CONNECTION=log
FILESYSTEM_DISK=local
QUEUE_CONNECTION=database

CACHE_STORE=file
CACHE_PREFIX=

MEMCACHED_HOST=127.0.0.1

REDIS_CLIENT=phpredis
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_HANDLER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_MAILER=log
MAIL_HOST=127.0.0.1
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS=null
MAIL_FROM_ADDRESS="[email protected]"
MAIL_FROM_NAME="${APP_NAME}"

AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
AWS_USE_PATH_STYLE_ENDPOINT=false

PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1

MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
VITE_APP_NAME="${APP_NAME}"
22 changes: 9 additions & 13 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,20 @@ assignees: ''

---

<!-- DO NOT THROW THIS AWAY -->
**Docker image version**
Output of `docker images zeropingheroes/lanager`. You must be using the LANager Docker image to receive support.
<!-- DO NOT THROW THIS AWAY! FILL IT OUT SO WE CAN HELP :) -->

**Docker image information**
<!-- Run `docker images zeropingheroes/lanager` and paste the output -->
<!-- You must be using the LANager Docker image to receive support. -->

**Bug description**
A clear and concise description of what the bug is.
<!-- Describe the issue you are experiencing -->

**Reproduction steps**
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
<!-- List the steps anyone can take to reproduce the issue -->

**Expected behavior**
A clear and concise description of what you expected to happen.
<!-- Describe what you expected to happen -->

**Screenshots**
Add screenshots to help explain your problem.

**Additional context**
Add any other context about the problem here.
<!-- Add screenshots to help everyone understand the issue -->
15 changes: 7 additions & 8 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@ assignees: ''

---

**Describe the problem you'd like to solve**
For example, _Currently it's difficult to [...]_
<!-- DO NOT THROW THIS AWAY! FILL IT OUT SO WE CAN HELP :) -->

**Describe the solution you'd like**
For example, _Add a button that, when pressed, automatically [...]_
**Feature description**
<!-- Describe the feature you would like, in detail -->

**Describe alternatives you've considered**
For example, _Instead of a button, a new page that [...]_
**Motivation**
<!-- Describe why you want this feature, and who it will benefit -->

**Additional context**
Add any other context or screenshots about the feature request here.
**Screenshots**
<!-- Add screenshots or mock-ups to help us understand the feature -->
7 changes: 4 additions & 3 deletions .github/workflows/docker-image-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,17 @@ jobs:
steps:
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v3
uses: docker/build-push-action@v6
with:
target: base
push: true
tags: zeropingheroes/lanager:develop
7 changes: 4 additions & 3 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,17 @@ jobs:
steps:
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v3
uses: docker/build-push-action@v6
with:
target: base
push: true
tags: zeropingheroes/lanager:stable
31 changes: 21 additions & 10 deletions .github/workflows/run-dusk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@ jobs:
APP_LOCALE: en
APP_DEBUG: true
STEAM_API_KEY: ${{ secrets.STEAM_API_KEY }}
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
DB_CONNECTION: mysql
DB_HOST: localhost
DB_PORT: 3306
DB_DATABASE: lanager
DB_USERNAME: root
DB_PASSWORD: root
CACHE_DRIVER: file
CACHE_STORE: file
SESSION_DRIVER: database
SESSION_LIFETIME: 7200
LOG_CHANNEL: file
DUSK_DRIVER_URL: http://localhost:9515
COLUMNS: 240

steps:
- name: Start MySQL
Expand All @@ -43,16 +43,17 @@ jobs:
run: mysql -e 'CREATE DATABASE ${{ env.DB_DATABASE }};' -u${{ env.DB_USERNAME }} -p${{ env.DB_PASSWORD }}

- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
php-version: '8.3'
extensions: xmlwriter, zip, pdo, pdo_mysql, tokenizer, simplexml, bcmath, fileinfo
ini-values: error_reporting=22527

- name: Install Composer dependencies
run: composer install --prefer-dist --no-scripts --no-interaction
run: composer install --optimize-autoloader --no-interaction --no-progress --no-scripts

- name: Link Laravel storage directory
run: php artisan storage:link
Expand All @@ -69,22 +70,32 @@ jobs:
- name: Start Chrome Driver
run: ./vendor/laravel/dusk/bin/chromedriver-linux &

- name: Create empty .env file
run: touch .env

- name: Start built-in webserver
run: php artisan serve > /dev/null 2>&1 &

- name: Run Laravel Dusk tests
run: php artisan dusk

- name: Upload Screenshots
- name: Upload Browser Screenshots
if: failure()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: screenshots
name: browser-screenshots
path: storage/logs/dusk/screenshots

- name: Upload Console Logs
uses: actions/upload-artifact@v4
if: failure()
uses: actions/upload-artifact@v2
with:
name: console
name: console-logs
path: storage/logs/dusk/console

- name: Upload Laravel Log
uses: actions/upload-artifact@v4
with:
name: laravel-log
path: storage/logs/laravel.log
if-no-files-found: ignore
30 changes: 19 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,19 +1,27 @@
/*.tar.gz
.env
.env.backup
/.idea
/.phpstorm.meta.php
/.phpunit.result.cache
/.vscode
/_ide_helper.php
/.phpunit.cache
/node_modules
/public/build
/public/hot
/public/storage
/storage/*.bucket
/storage/*.key
/vendor
npm-debug.log
yarn-error.log
.env
.env.backup
.env.production
.phpactor.json
.phpunit.result.cache
Homestead.json
Homestead.yaml
auth.json
npm-debug.log
yarn-error.log
/.fleet
/.idea
/.vscode
/.phpstorm.meta.php
/storage/.phpunit.cache/
/_ide_helper.php
/storage/logs/*
/.php-cs-fixer.cache
/storage/*.bucket
/*.tar.gz
28 changes: 18 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM composer:2 as composer2
FROM composer:2.7 AS composer2

# Copy in project code
COPY . /app
Expand All @@ -10,19 +10,16 @@ RUN composer install \
--no-progress \
--no-scripts

FROM trafex/php-nginx:2.5.0
FROM trafex/php-nginx:3.6.0 AS base

USER root

# Install PHP extensions
RUN apk --no-cache add php8-xmlwriter=8.0.24-r0 \
php8-zip=8.0.24-r0 \
php8-pdo=8.0.24-r0 \
php8-pdo_mysql=8.0.24-r0 \
php8-tokenizer=8.0.24-r0 \
php8-simplexml=8.0.24-r0 \
php8-bcmath=8.0.24-r0 \
php8-fileinfo=8.0.24-r0
RUN apk --no-cache add php83-zip=8.3.10-r0 \
php83-pdo=8.3.10-r0 \
php83-pdo_mysql=8.3.10-r0 \
php83-simplexml=8.3.10-r0 \
php83-bcmath=8.3.10-r0

# Copy in app code and Composer packages from composer2 build stage
COPY --chown=nginx --from=composer2 /app /var/www/lanager
Expand All @@ -34,3 +31,14 @@ WORKDIR /var/www/lanager

# Change to non-privileged user
USER nobody

FROM base AS dev

# Temporary switch to root
USER root

# Install xdebug
RUN apk --no-cache add php83-pecl-xdebug=3.3.2-r0

# Switch back to non-root user
USER nobody
Loading

0 comments on commit 38d97bd

Please sign in to comment.