Build image.
This commit is contained in:
45
.gitea/workflows/release.yml
Normal file
45
.gitea/workflows/release.yml
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
name: Build power-consumption image
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ master ]
|
||||||
|
|
||||||
|
env:
|
||||||
|
# Use docker.io for Docker Hub if empty
|
||||||
|
REGISTRY: cs-registry.ddnss.de
|
||||||
|
USER: chris
|
||||||
|
PASS: q',\H(Od:G3).Xv<#!5P
|
||||||
|
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
Build-and-release-image:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
container:
|
||||||
|
image: catthehacker/ubuntu:act-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v2
|
||||||
|
|
||||||
|
- name: Log into registry
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: https://cs-git.ddnss.de
|
||||||
|
username: ${{ env.USER }}
|
||||||
|
password: ${{ env.PASS }}
|
||||||
|
|
||||||
|
- name: Extract Docker metadata
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v5
|
||||||
|
with:
|
||||||
|
images: cs-git.ddnss.de/home/power-consumption
|
||||||
|
|
||||||
|
- name: Build and push Docker image
|
||||||
|
uses: docker/build-push-action@v4
|
||||||
|
env:
|
||||||
|
ACTIONS_RUNTIME_TOKEN: ''
|
||||||
|
with:
|
||||||
|
tags: cs-git.ddnss.de/home/power-consumption:latest
|
||||||
|
push: true
|
||||||
13
Dockerfile
Normal file
13
Dockerfile
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
#Use prebuilt image
|
||||||
|
FROM cs-git.ddnss.de/docker/php-apache-8-3:latest
|
||||||
|
WORKDIR /var/www/html
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
RUN sed -ri -e 's!/var/www/!/var/www/html/public/!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
|
||||||
|
RUN sed -ri -e 's!AllowOverride None!AllowOverride All!g' /etc/apache2/apache2.conf
|
||||||
|
|
||||||
|
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
|
||||||
|
|
||||||
|
RUN chown -R www-data:www-data /var/www/html
|
||||||
|
|
||||||
|
VOLUME /var/www/html
|
||||||
Reference in New Issue
Block a user