Updates.
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
name: Build and Push PHP Container Image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main] # or master / your default branch
|
||||
# Optional: also on tags
|
||||
# tags: ['v*']
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
# Recommended for Docker build tools on many self-hosted runners
|
||||
container:
|
||||
image: catthehacker/ubuntu:act-latest
|
||||
env:
|
||||
REGISTRY: gitea.example.com # ← your Gitea hostname (no https://)
|
||||
IMAGE_NAME: ${{ gitea.repository }} # owner/repo style, or hard-code owner/image
|
||||
# Or: IMAGE_NAME: myuser/php-website
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up QEMU (for multi-arch, optional)
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
# Only needed if your Gitea registry is HTTP / self-signed:
|
||||
# with:
|
||||
# config-inline: |
|
||||
# [registry."gitea.example.com"]
|
||||
# http = true
|
||||
# insecure = true
|
||||
|
||||
- name: Login to Gitea Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
|
||||
- name: Extract metadata / tags
|
||||
id: meta
|
||||
run: |
|
||||
echo "VERSION=$(git describe --tags --always 2>/dev/null || echo ${{ gitea.sha }})" >> $GITHUB_OUTPUT
|
||||
# or simply use latest + sha
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
push: true
|
||||
tags: |
|
||||
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
|
||||
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ gitea.sha }}
|
||||
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.VERSION }}
|
||||
# platforms: linux/amd64,linux/arm64 # uncomment for multi-arch
|
||||
# cache-from: type=registry,ref=...
|
||||
# cache-to: type=registry,ref=...,mode=max
|
||||
@@ -1,12 +1,13 @@
|
||||
Options +FollowSymLinks
|
||||
RewriteEngine on
|
||||
|
||||
RewriteCond %{HTTP_HOST} !^www\.dialyse-berlin\.net [NC]
|
||||
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]
|
||||
#RewriteEngine on
|
||||
|
||||
RewriteCond %{HTTP_HOST} ^www\.dialyse-berlin\.net [NC]
|
||||
RewriteCond %{HTTPS} !=on
|
||||
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
|
||||
#RewriteCond %{HTTP_HOST} !^www\.dialyse-berlin\.net [NC]
|
||||
#RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]
|
||||
|
||||
#RewriteCond %{HTTP_HOST} ^www\.dialyse-berlin\.net [NC]
|
||||
#RewriteCond %{HTTPS} !=on
|
||||
#RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
|
||||
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{QUERY_STRING} ([a-zA-Z0-9-_.=&+%]*)
|
||||
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
FROM php:8.5-apache
|
||||
|
||||
# Install common extensions (example)
|
||||
# RUN docker-php-ext-install
|
||||
|
||||
# Enable Apache modules if needed
|
||||
RUN a2enmod rewrite
|
||||
|
||||
# Copy application code
|
||||
COPY . /var/www/html/
|
||||
|
||||
# Disable the legacy HTTPS redirect rules from .htaccess so the container stays on plain HTTP
|
||||
# RUN sed -i '/RewriteCond %{HTTP_HOST} !^www\\.dialyse-berlin\\.net \[NC\]/,+2d; /RewriteCond %{HTTP_HOST} ^www\\.dialyse-berlin\\.net \[NC\]/,+2d' /var/www/html/.htaccess || true \
|
||||
# && a2dismod ssl || true
|
||||
|
||||
# Set permissions
|
||||
RUN chown -R www-data:www-data /var/www/html
|
||||
|
||||
# Optional: install Composer dependencies if you have a composer.json
|
||||
# COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
|
||||
# RUN composer install --no-dev --optimize-autoloader
|
||||
|
||||
EXPOSE 80
|
||||
+1
-1
@@ -131,7 +131,7 @@ h4 {
|
||||
#header {
|
||||
background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
|
||||
color: white;
|
||||
padding: 2rem 0;
|
||||
padding: 1rem 0;
|
||||
box-shadow: var(--shadow);
|
||||
}
|
||||
|
||||
|
||||
Vendored
-2
File diff suppressed because one or more lines are too long
Vendored
+2
File diff suppressed because one or more lines are too long
+1
-1
@@ -13,7 +13,7 @@
|
||||
<link href="/css/modern.css" rel="stylesheet" media="screen">
|
||||
<link href="/css/lightbox.min.css" rel="stylesheet" media="screen">
|
||||
|
||||
<script src="/js/jquery-3.6.1.min.js" type="text/javascript"></script>
|
||||
<script src="/js/jquery-3.7.1.min.js" type="text/javascript"></script>
|
||||
<script src="/js/lightbox-plus-jquery.min.js" type="text/javascript"></script>
|
||||
</head>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user