Skip to content

Commit

Permalink
Merge pull request #814 from Lan2Play/dev
Browse files Browse the repository at this point in the history
Dependency updates + seating plan copy function + revoke participants + fix no png logo
  • Loading branch information
Apfelwurm authored Oct 3, 2024
2 parents 2c8281f + 2de9aae commit 7c9e651
Show file tree
Hide file tree
Showing 59 changed files with 3,740 additions and 4,367 deletions.
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
* text=auto
* text=auto eol=lf
*.css linguist-vendored
*.less linguist-vendored
# These settings are for any web project
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/test_and_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3.0.0
uses: docker/setup-qemu-action@v3.2.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: get dependencies
Expand All @@ -39,13 +39,13 @@ jobs:
run: make folder-structure-dev; make layout-images-dev
- name: Login to DockerHub
if: ${{ github.event_name != 'pull_request' }}
uses: docker/login-action@v3.0.0
uses: docker/login-action@v3.3.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build Linux Image
if: ${{ github.event_name == 'pull_request' }}
uses: docker/build-push-action@v5.1.0
uses: docker/build-push-action@v6.9.0
with:
context: .
file: ./Dockerfile
Expand All @@ -62,7 +62,7 @@ jobs:
push: false
- name: Build and push Linux Image
if: ${{ startsWith(github.ref, 'refs/heads/master') && github.event_name == 'push' }}
uses: docker/build-push-action@v5.1.0
uses: docker/build-push-action@v6.9.0
with:
context: .
file: ./Dockerfile
Expand All @@ -79,7 +79,7 @@ jobs:
push: true
- name: Build and push Linux Image dev
if: ${{ startsWith(github.ref, 'refs/heads/dev') && github.event_name == 'push' }}
uses: docker/build-push-action@v5.1.0
uses: docker/build-push-action@v6.9.0
with:
context: .
file: ./Dockerfile
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-dockerhub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Update Docker HUB Description
uses: peter-evans/dockerhub-description@v3.4.2
uses: peter-evans/dockerhub-description@v4.0.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
Expand Down
19 changes: 9 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
# FROM th0rn0/php-nginx-base:latest
FROM lan2play/docker-php-nginx-base:latest
LABEL org.opencontainers.image.authors="Thornton Phillis ([email protected]), Alexader Volz ([email protected])"

# ENV - App Defaults

ENV UUID 82
ENV GUID 82
ENV ENABLE_HTTPS false
ENV LOG_FILES false
ENV ANALYTICS_PROVIDER GoogleAnalytics
ENV DB_MIGRATE false
ENV TIMEZONE UTC
ENV UUID=82
ENV GUID=82
ENV ENABLE_HTTPS=false
ENV LOG_FILES=false
ENV ANALYTICS_PROVIDER=GoogleAnalytics
ENV DB_MIGRATE=false
ENV TIMEZONE=UTC

#versioning
ARG BUILDNUMBER
Expand All @@ -28,8 +27,8 @@ ENV SOURCE_REF=$SOURCE_REF
COPY resources/docker/root /
WORKDIR $NGINX_DOCUMENT_ROOT
COPY --chown=${UUID}:${GUID} src/ $NGINX_DOCUMENT_ROOT
RUN find $NGINX_DOCUMENT_ROOT -type d ! -perm 0775 -print0 | xargs -0 -r chmod 775
RUN find $NGINX_DOCUMENT_ROOT -type f ! -perm 0664 -print0 | xargs -0 -r chmod 664
RUN find $NGINX_DOCUMENT_ROOT -type d ! -perm 0775 -exec chmod 775 {} \;
RUN find $NGINX_DOCUMENT_ROOT -type f ! -perm 0664 -exec chmod 664 {} \;
RUN chgrp -R ${GUID} $NGINX_DOCUMENT_ROOT/storage $NGINX_DOCUMENT_ROOT/bootstrap/cache
RUN chmod -R ug+rwx $NGINX_DOCUMENT_ROOT/storage $NGINX_DOCUMENT_ROOT/bootstrap/cache

Expand Down
54 changes: 35 additions & 19 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Initialize variables
ifeq ($(OS),Windows_NT)
currentDir = $(patsubst %/,%, $(subst /mnt, ,$(shell wsl wslpath -u $(strip $(dir $(realpath $(lastword $(MAKEFILE_LIST))))))))
currentDir = $(patsubst %/,%, $(lastword $(subst /host, ,$(shell wsl wslpath -u $(strip $(dir $(realpath $(lastword $(MAKEFILE_LIST)))))))))
userId = $(shell wsl id -u)
groupId = $(shell wsl id -g)
else
Expand All @@ -9,6 +9,11 @@ userId = $(shell id -u)
groupId = $(shell id -g)
endif

ifeq (userId,0)
userId = 1000
groupId = 1000
endif

user = --user $(userId):$(groupId)

ifeq ($(OS),Windows_NT)
Expand All @@ -21,7 +26,6 @@ else
endif
endif


# Run local dev
start-local-dev: env-file-dev docker-lan app-build-clean-dev logs

Expand All @@ -39,13 +43,12 @@ interactive:

# Stop all Containers
stop:
$(DOCKER_COMPOSE) -f docker-compose-dev.yml stop || true
$(DOCKER_COMPOSE) -f docker-compose-dev.yml stop ||: true

# Build from clean
app-build-clean: folder-structure-prd layout-images-prd app-build-dep generate-key-prd dev wait-mysql database-migrate database-seed stop

# Build dev from clean
# app-build-clean-dev: folder-structure-dev layout-images-dev app-build-dep-dev purge-cache generate-key-dev dev wait-mysql database-migrate database-seed stop
app-build-clean-dev: folder-structure-dev layout-images-dev app-build-dep-dev purge-cache generate-key-dev dev #wait-mysql stop

# Build Dependencies
Expand All @@ -65,7 +68,7 @@ docs-html:
docker-lan:
ifeq ($(OS),Windows_NT)
#not tested!
ifeq ($(shell docker network ls --filter=NAME=lan | Measure-Object Line),1)
ifeq ($(shell powershell -Command "docker network ls --filter NAME=lan | Measure-Object -Line | Select-Object -ExpandProperty Lines"),1)
docker network create lan
endif
else
Expand Down Expand Up @@ -261,14 +264,14 @@ composer-outdated-direct:
docker run --rm --name compose-maintainence-update --interactive \
--volume $(currentDir)/src:/app \
$(user) \
composer:latest composer outdated -D
composer:latest composer outdated -D --ignore-platform-reqs

# list Composer outdated
composer-outdated:
docker run --rm --name compose-maintainence-update --interactive \
--volume $(currentDir)/src:/app \
$(user) \
composer:latest composer outdated
composer:latest composer outdated --ignore-platform-reqs

# add PHP Dependencies via Composer - usage make composer-add-dep module=module/namehere
composer-add-dep:
Expand All @@ -290,63 +293,63 @@ npm-install:
-v $(currentDir)/src:/usr/src/app \
-w /usr/src/app \
--user 82:82 \
node:20.8 /bin/bash -ci "npm install --no-audit && npm run production"
node:22.9 /bin/bash -ci "npm install --no-audit && npm run production"

# Install PRD JS Dependencies via NPM locally
npm-install-local:
docker run --rm --name js-maintainence-dev --interactive \
-v $(currentDir)/src:/usr/src/app \
-w /usr/src/app \
$(user) \
node:20.8 /bin/bash -ci "npm install --no-audit && npm run production"
node:22.9 /bin/bash -ci "npm install --no-audit && npm run production"

# Install JS Dependencies via NPM
npm-install-gh:
docker run --rm --name js-maintainence --interactive \
-v $(currentDir)/src:/usr/src/app \
-w /usr/src/app \
--user 0 \
node:20.8 /bin/bash -ci "npm install --no-audit && npm run production && chown -R $(userId):$(groupId) /usr/src/app"
node:22.9 /bin/bash -ci "npm install --no-audit && npm run production && chown -R $(userId):$(groupId) /usr/src/app"

# Install Dev JS Dependencies via NPM
npm-install-dev:
docker run --rm --name js-maintainence-dev --interactive \
-v $(currentDir)/src:/usr/src/app \
-w /usr/src/app \
$(user) \
node:20.8 /bin/bash -ci "npm install --no-audit && npm run dev"
node:22.9 /bin/bash -ci "npm install --no-audit && npm run dev"

#list npm package - usage make npm-ls module=module
npm-ls:
docker run --rm --name js-maintainence-list --interactive \
-v $(currentDir)/src:/usr/src/app \
-w /usr/src/app \
$(user) \
node:20.8 /bin/bash -ci "npm ls $(module)"
node:22.9 /bin/bash -ci "npm ls $(module)"

#update npm packages - usage make npm-update
npm-update:
docker run --rm --name js-maintainence-list --interactive \
-v $(currentDir)/src:/usr/src/app \
-w /usr/src/app \
$(user) \
node:20.8 /bin/bash -ci "npm update"
node:22.9 /bin/bash -ci "npm update"

#audit npm packages - usage make npm-audit
npm-audit:
docker run --rm --name js-maintainence-list --interactive \
-v $(currentDir)/src:/usr/src/app \
-w /usr/src/app \
$(user) \
node:20.8 /bin/bash -ci "npm audit"
node:22.9 /bin/bash -ci "npm audit"

#audit fix npm packages - usage make npm-audit-fix
npm-audit-fix:
docker run --rm --name js-maintainence-list --interactive \
-v $(currentDir)/src:/usr/src/app \
-w /usr/src/app \
$(user) \
node:20.8 /bin/bash -ci "npm audit fix"
node:22.9 /bin/bash -ci "npm audit fix"


#list outdated npm packages
Expand All @@ -355,39 +358,48 @@ npm-outdated:
-v $(currentDir)/src:/usr/src/app \
-w /usr/src/app \
$(user) \
node:20.8 /bin/bash -ci "npm outdated"
node:22.9 /bin/bash -ci "npm outdated"

#rebuild node
npm-rebuild:
docker run --rm --name js-maintainence-outdated --interactive \
-v $(currentDir)/src:/usr/src/app \
-w /usr/src/app \
$(user) \
node:20.8 /bin/bash -ci "npm rebuild"
node:22.9 /bin/bash -ci "npm rebuild"

# npm mix Runner
mix:
docker run --rm --name js-maintainence-dev --interactive \
-v $(currentDir)/src:/usr/src/app \
-w /usr/src/app \
--user 82:82 \
node:20.8 /bin/bash -ci "npm run production"
node:22.9 /bin/bash -ci "npm run production"

mix-dev:
docker run --rm --name js-maintainence-dev --interactive \
-v $(currentDir)/src:/usr/src/app \
-w /usr/src/app \
$(user) \
node:20.8 /bin/bash -ci "npm run development"
node:22.9 /bin/bash -ci "npm run development"

# Purge Containers
purge-containers:
ifeq ($(OS),Windows_NT)
$(DOCKER_COMPOSE) -f docker-compose-dev.yml stop ||: true
$(DOCKER_COMPOSE) -f docker-compose-dev.yml rm -vf ||: true
docker rm eventula_manager_app ||: true
docker rm eventula_manager_database ||: true
docker volume rm eventula_manager_database ||: true
docker volume rm eventula_manager_storage ||: true
else
$(DOCKER_COMPOSE) -f docker-compose-dev.yml -p eventula_manager stop || true
$(DOCKER_COMPOSE) -f docker-compose-dev.yml -p eventula_manager rm -vf || true
docker rm eventula_manager_app || true
docker rm eventula_manager_database || true
docker volume rm eventula_manager_database || true
docker volume rm eventula_manager_storage || true
endif

# Purge Caches
purge-cache:
Expand Down Expand Up @@ -428,7 +440,11 @@ database-upgrade:

# execute mysql command usage make database-command command=sqlcommandhere
database-command:
ifeq ($(OS),Windows_NT)
powershell.exe -Command "echo \"use eventula_manager_database; $(command)\"| docker exec -i eventula_manager_database mysql -u eventula_manager -p'password'"
else
echo "use eventula_manager_database; $(command)" | docker exec -i eventula_manager_database mysql -u eventula_manager -p'password'
endif

# import mysql database usage make database-command dbfile=dbfile.sql
ifndef dbfile
Expand Down
1 change: 0 additions & 1 deletion docker-compose-dev.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# !!!!!!!!!!!!! DONT USE THIS EXAMPLE FOR PRODUCTION! GO TO https://eventula.lan2play.de/admin/getting_started.html#create-your-docker-compose-yml-file AND GET THE FILES THERE !!!!!!!!!!!!!
version: "3.4"
services:
eventula_manager_app:
build:
Expand Down
2 changes: 0 additions & 2 deletions docker-compose-local-prd.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# !!!!!!!!!!!!! DONT USE THIS EXAMPLE FOR PRODUCTION! GO TO https://eventula.lan2play.de/admin/getting_started.html#create-your-docker-compose-yml-file AND GET THE FILES THERE !!!!!!!!!!!!!

version: "3.4"
services:
eventula_manager_app:
build:
Expand Down
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# !!!!!!!!!!!!! DONT USE THIS EXAMPLE FOR PRODUCTION! GO TO https://eventula.lan2play.de/admin/getting_started.html#create-your-docker-compose-yml-file AND GET THE FILES THERE !!!!!!!!!!!!!
version: "3.4"
services:
eventula_manager_app:
image: lan2play/eventula-manager
Expand Down
1 change: 0 additions & 1 deletion docs/source/admin/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,6 @@ Fill in the APP_KEY from the last step and all other empty Variables (if not opt

.. code-block:: yaml
version: "3.4"
services:
app:
image: lan2play/eventula-manager:latest
Expand Down
2 changes: 1 addition & 1 deletion intelephense-alias.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ class Helpers extends App\Libraries\Helpers
class FacebookPageWrapper extends App\Libraries\Facebook\FacebookPageWrapper
{
}
class Image extends Intervention\Image\Facades\Image
class Image extends Intervention\Image\Laravel\Facades\Image
{
}
class SEOMeta extends Artesaos\SEOTools\Facades\SEOMeta
Expand Down
Loading

0 comments on commit 7c9e651

Please sign in to comment.