Compare commits
No commits in common. "frankenphp" and "master" have entirely different histories.
frankenphp
...
master
|
|
@ -1,12 +1,14 @@
|
|||
FROM dunglas/frankenphp:1.12.7-php8.3-bookworm AS php
|
||||
FROM php:8.3.36-fpm AS php
|
||||
WORKDIR /app
|
||||
RUN ls /app
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y rsync curl apt-utils unzip poppler-utils default-mysql-client imagemagick
|
||||
RUN apt-get install -y rsync libcurl3-dev apt-utils zlib1g-dev libpng-dev libicu-dev libonig-dev unzip poppler-utils libpng-dev libjpeg-dev default-mysql-client libzip-dev imagemagick libmagickwand-dev
|
||||
RUN apt-get install -y --no-install-recommends texlive-base texlive-latex-base texlive-pictures texlive-latex-extra texlive-lang-german texlive-plain-generic texlive-fonts-recommended texlive-fonts-extra texlive-extra-utils
|
||||
RUN install-php-extensions pdo_mysql curl exif intl mbstring pcntl zip redis imagick gd
|
||||
RUN docker-php-ext-install pdo_mysql curl exif intl mbstring pcntl zip
|
||||
RUN pecl install redis && docker-php-ext-enable redis
|
||||
RUN pecl install imagick && docker-php-ext-enable imagick
|
||||
RUN docker-php-ext-configure gd --with-jpeg
|
||||
RUN docker-php-ext-install gd
|
||||
RUN usermod -s /bin/bash www-data
|
||||
RUN echo 'memory_limit = 2G' >> /usr/local/etc/php/conf.d/99-custom-php-memlimit.ini
|
||||
|
||||
# Allow FrankenPHP to bind to port 80 and write its state when running as www-data
|
||||
RUN setcap CAP_NET_BIND_SERVICE=+eip /usr/local/bin/frankenphp \
|
||||
&& chown -R www-data:www-data /data/caddy /config/caddy
|
||||
|
|
|
|||
|
|
@ -1,34 +0,0 @@
|
|||
{
|
||||
auto_https off
|
||||
admin off
|
||||
frankenphp
|
||||
}
|
||||
|
||||
:80 {
|
||||
root * /app/public
|
||||
encode zstd gzip
|
||||
header -Server
|
||||
|
||||
request_body {
|
||||
max_size 10MB
|
||||
}
|
||||
|
||||
@hidden {
|
||||
path */.*
|
||||
not path /.well-known/*
|
||||
}
|
||||
|
||||
route {
|
||||
redir /.well-known/carddav /dav 301
|
||||
redir /.well-known/caldav /dav 301
|
||||
respond @hidden 403
|
||||
|
||||
reverse_proxy /app/adremakey* socketi:6001
|
||||
reverse_proxy /indexes/members/search meilisearch:7700
|
||||
|
||||
header Access-Control-Allow-Credentials "true"
|
||||
header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
|
||||
header Access-Control-Allow-Headers "Accept,Authorization,Client-Id,Client-Secret,Cache-Control,Content-Type,Pragma,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Mx-ReqToken,X-Requested-With,App-Platform,App-Version,Idempotency-Key"
|
||||
php_server
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
FROM composer:2.7.9 AS composer
|
||||
WORKDIR /app
|
||||
COPY . /app
|
||||
RUN composer install --ignore-platform-reqs --no-dev
|
||||
RUN php artisan telescope:publish
|
||||
RUN php artisan horizon:publish
|
||||
|
||||
FROM node:20.15.0-slim AS node
|
||||
WORKDIR /app
|
||||
COPY . /app
|
||||
RUN npm install && npm run prod && npm run img && rm -R node_modules
|
||||
|
||||
FROM nginx:1.21.6-alpine AS nginx
|
||||
WORKDIR /app
|
||||
COPY --from=node /app /app
|
||||
COPY --from=composer /app/public/vendor /app/public/vendor
|
||||
COPY ./.docker/nginx/nginx.conf /etc/nginx/nginx.conf
|
||||
EXPOSE 80
|
||||
|
||||
VOLUME ["/app/public/storage"]
|
||||
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
events {
|
||||
worker_connections 768;
|
||||
# multi_accept on;
|
||||
}
|
||||
|
||||
http {
|
||||
include mime.types;
|
||||
include fastcgi.conf;
|
||||
default_type application/octet-stream;
|
||||
sendfile on;
|
||||
tcp_nopush on;
|
||||
server_tokens off;
|
||||
client_max_body_size 10M;
|
||||
gzip on;
|
||||
gzip_disable "msie6";
|
||||
gzip_vary on;
|
||||
gzip_proxied any;
|
||||
gzip_comp_level 6;
|
||||
gzip_buffers 16 8k;
|
||||
gzip_http_version 1.1;
|
||||
gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
root /app/public;
|
||||
charset utf-8;
|
||||
index index.php;
|
||||
location /app/adremakey {
|
||||
proxy_pass http://socketi:6001;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "Upgrade";
|
||||
proxy_set_header Host $host;
|
||||
proxy_cache_bypass $http_upgrade;
|
||||
proxy_redirect off;
|
||||
proxy_read_timeout 60;
|
||||
proxy_connect_timeout 60;
|
||||
}
|
||||
location /indexes/members/search {
|
||||
proxy_pass http://meilisearch:7700/indexes/members/search;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "Upgrade";
|
||||
proxy_set_header Host $host;
|
||||
proxy_cache_bypass $http_upgrade;
|
||||
proxy_redirect off;
|
||||
proxy_read_timeout 60;
|
||||
proxy_connect_timeout 60;
|
||||
}
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
}
|
||||
location = /favicon.ico { access_log off; log_not_found off; }
|
||||
location = /robots.txt { access_log off; log_not_found off; }
|
||||
error_page 404 /index.php;
|
||||
location = /.well-known/carddav {
|
||||
return 301 $scheme://$host/dav;
|
||||
}
|
||||
location = /.well-known/caldav {
|
||||
return 301 $scheme://$host/dav;
|
||||
}
|
||||
location ~ /\.ht {
|
||||
deny all;
|
||||
}
|
||||
location ~ /\.(?!well-known).* {
|
||||
deny all;
|
||||
}
|
||||
location ~ \.php$ {
|
||||
add_header 'Access-Control-Allow-Credentials' 'true' always;
|
||||
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS' always;
|
||||
add_header 'Access-Control-Allow-Headers' 'Accept,Authorization,Client-Id,Client-Secret,Cache-Control,Content-Type,Pragma,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Mx-ReqToken,X-Requested-With,App-Platform,App-Version,Idempotency-Key' always;
|
||||
fastcgi_pass php:9000;
|
||||
fastcgi_index index.php;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -6,7 +6,7 @@ RUN composer install --ignore-platform-reqs --no-dev
|
|||
FROM node:20.15.0-slim AS node
|
||||
WORKDIR /app
|
||||
COPY . /app
|
||||
RUN npm ci && npm run prod && npm run img && rm -R node_modules
|
||||
RUN npm install && npm run prod && npm run img && rm -R node_modules
|
||||
|
||||
FROM zoomyboy/adrema-base:latest AS php
|
||||
COPY --chown=www-data:www-data . /app
|
||||
|
|
@ -16,14 +16,12 @@ COPY --chown=www-data:www-data --from=composer /app/vendor /app/vendor
|
|||
USER www-data
|
||||
RUN php artisan telescope:publish
|
||||
RUN php artisan horizon:publish
|
||||
RUN php artisan storage:link
|
||||
|
||||
USER root
|
||||
COPY ./.docker/php /bin
|
||||
COPY ./.docker/frankenphp/Caddyfile /etc/caddy/Caddyfile
|
||||
|
||||
VOLUME ["/app/packages/laravel-nami/.cookies", "/app/storage/app", "/app/resources/views/tex/invoice"]
|
||||
|
||||
EXPOSE 80
|
||||
EXPOSE 9000
|
||||
|
||||
CMD ["/bin/entrypoint", "app"]
|
||||
CMD /bin/php-entrypoint
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ if [ $1 == "app" ]; then
|
|||
php -r '$connection = new PDO("mysql:host='$DB_HOST';dbname='$DB_DATABASE'", "'$DB_USERNAME'", "'$DB_PASSWORD'"); $connection->query("DESCRIBE migrations");' > /dev/null || php artisan migrate --seed --force
|
||||
su www-data -c 'php artisan migrate --force'
|
||||
php artisan scout:sync-index-settings
|
||||
exec su www-data -c 'frankenphp run --config /etc/caddy/Caddyfile'
|
||||
php-fpm -F -R -O
|
||||
fi
|
||||
|
||||
|
||||
|
|
|
|||
15
.drone.yml
15
.drone.yml
|
|
@ -92,6 +92,21 @@ steps:
|
|||
when:
|
||||
event: tag
|
||||
|
||||
- name: docker_webservice_push
|
||||
image: plugins/docker
|
||||
settings:
|
||||
dockerfile: ./.docker/nginx.Dockerfile
|
||||
repo: zoomyboy/adrema-webservice
|
||||
username: zoomyboy
|
||||
password:
|
||||
from_secret: docker_hub_token
|
||||
tags:
|
||||
- latest
|
||||
- ${DRONE_TAG}
|
||||
pull_image: true
|
||||
when:
|
||||
event: tag
|
||||
|
||||
- name: deploy
|
||||
image: zoomyboy/adrema-base:latest
|
||||
environment:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,14 @@
|
|||
version: '3'
|
||||
services:
|
||||
webservice:
|
||||
image: zoomyboy/adrema-webservice:latest
|
||||
depends_on:
|
||||
- php
|
||||
ports:
|
||||
- '8000:80'
|
||||
volumes:
|
||||
- ./data/storage/public:/app/storage/app/public
|
||||
|
||||
php:
|
||||
image: zoomyboy/adrema-app:latest
|
||||
depends_on:
|
||||
|
|
@ -7,8 +16,6 @@ services:
|
|||
- redis
|
||||
- socketi
|
||||
command: /bin/entrypoint app
|
||||
ports:
|
||||
- '8000:80'
|
||||
env_file:
|
||||
- .app.env
|
||||
environment:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,16 @@
|
|||
version: '3'
|
||||
services:
|
||||
webservice:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./.docker/nginx.Dockerfile
|
||||
depends_on:
|
||||
- php
|
||||
ports:
|
||||
- '8000:80'
|
||||
volumes:
|
||||
- ./data/storage/public:/app/public/storage
|
||||
|
||||
php:
|
||||
build:
|
||||
context: .
|
||||
|
|
@ -9,8 +20,6 @@ services:
|
|||
- redis
|
||||
- socketi
|
||||
command: /bin/entrypoint app
|
||||
ports:
|
||||
- '8000:80'
|
||||
env_file:
|
||||
- .app.env
|
||||
environment:
|
||||
|
|
|
|||
Loading…
Reference in New Issue