Feature/self host (#6)
* Self hosting test * all branches? * remove branches statements * Revert "remove branches statements" This reverts commit cb45bb82 * Branches R hard * bump * bump2 * remove caching from self-host branch * bump3 * Missed out moving things * Self signed certs don't need to be freshly baked. This might be faster.
This commit is contained in:
parent
6934877fdf
commit
1b657b62e8
12 changed files with 79 additions and 45 deletions
2
.github/workflows/lint.yml
vendored
2
.github/workflows/lint.yml
vendored
|
|
@ -7,7 +7,7 @@ on:
|
|||
jobs:
|
||||
lint:
|
||||
name: Lint Docker Files
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: self-hosted
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
|
|
|
|||
4
.github/workflows/mariadb.yml
vendored
4
.github/workflows/mariadb.yml
vendored
|
|
@ -7,14 +7,14 @@ on:
|
|||
workflow_run:
|
||||
workflows:
|
||||
- Lint Docker Files
|
||||
branches: [master]
|
||||
branches: [ 'master', 'feature/**' ]
|
||||
types:
|
||||
- completed
|
||||
|
||||
jobs:
|
||||
mariadb-build:
|
||||
name: "MariaDB with Healthchecks"
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: self-hosted
|
||||
needs: [ lint ]
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
|
|
|
|||
4
.github/workflows/marshall.yml
vendored
4
.github/workflows/marshall.yml
vendored
|
|
@ -7,7 +7,7 @@ on:
|
|||
workflow_run:
|
||||
workflows:
|
||||
- Lint Docker Files
|
||||
branches: [master]
|
||||
branches: [ 'master', 'feature/**' ]
|
||||
types:
|
||||
- completed
|
||||
|
||||
|
|
@ -15,7 +15,7 @@ jobs:
|
|||
|
||||
build:
|
||||
name: "Build Marshall"
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: self-hosted
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: docker/setup-qemu-action@v1
|
||||
|
|
|
|||
6
.github/workflows/octoprint.yml
vendored
6
.github/workflows/octoprint.yml
vendored
|
|
@ -7,14 +7,14 @@ on:
|
|||
workflow_run:
|
||||
workflows:
|
||||
- Lint Docker Files
|
||||
branches: [master]
|
||||
branches: [ 'master', 'feature/**' ]
|
||||
types:
|
||||
- completed
|
||||
|
||||
jobs:
|
||||
octoprint-build:
|
||||
name: "Bake Octoprint"
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: self-hosted
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: docker/setup-qemu-action@v1
|
||||
|
|
@ -35,7 +35,7 @@ jobs:
|
|||
tags: matthewbaggett/octoprint:latest
|
||||
octoprint-mjpg-build:
|
||||
name: "Bake Octoprint for yuvu cameras"
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: self-hosted
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: docker/setup-qemu-action@v1
|
||||
|
|
|
|||
14
.github/workflows/php-core.yml
vendored
14
.github/workflows/php-core.yml
vendored
|
|
@ -8,7 +8,7 @@ on:
|
|||
workflow_run:
|
||||
workflows:
|
||||
- Build Marshall
|
||||
branches: [master]
|
||||
branches: [ 'master', 'feature/**' ]
|
||||
types:
|
||||
- completed
|
||||
|
||||
|
|
@ -16,7 +16,7 @@ jobs:
|
|||
|
||||
php-build-core:
|
||||
name: "Build PHP Core"
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: self-hosted
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
|
|
@ -59,13 +59,6 @@ jobs:
|
|||
with:
|
||||
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
||||
- name: Cache Docker layers
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: /tmp/.buildx-cache
|
||||
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-buildx-
|
||||
- uses: docker/build-push-action@v2
|
||||
name: Build & Push
|
||||
with:
|
||||
|
|
@ -79,5 +72,4 @@ jobs:
|
|||
benzine/php:core-${{ matrix.version }}
|
||||
build-args: |
|
||||
${{ steps.build_args.outputs.result }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
|
||||
|
|
|
|||
13
.github/workflows/php-flavours.yml
vendored
13
.github/workflows/php-flavours.yml
vendored
|
|
@ -10,14 +10,14 @@ on:
|
|||
workflow_run:
|
||||
workflows:
|
||||
- Build PHP Core
|
||||
branches: [master]
|
||||
branches: [ 'master', 'feature/**' ]
|
||||
types:
|
||||
- completed
|
||||
|
||||
jobs:
|
||||
php-build-flavours:
|
||||
name: "Build PHP Flavours"
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: self-hosted
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
|
|
@ -57,13 +57,6 @@ jobs:
|
|||
with:
|
||||
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
||||
- name: Cache Docker layers
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: /tmp/.buildx-cache
|
||||
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-buildx-
|
||||
- uses: docker/build-push-action@v2
|
||||
name: Build & Push
|
||||
with:
|
||||
|
|
@ -77,5 +70,3 @@ jobs:
|
|||
benzine/php:${{ matrix.variant }}-${{ matrix.version }}
|
||||
build-args: |
|
||||
${{ steps.build_args.outputs.result }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
|
|
|
|||
4
.github/workflows/php-vanity-tags.yml
vendored
4
.github/workflows/php-vanity-tags.yml
vendored
|
|
@ -4,14 +4,14 @@ on:
|
|||
workflow_run:
|
||||
workflows:
|
||||
- Build PHP Flavours
|
||||
branches: [master]
|
||||
branches: [ 'master', 'feature/**' ]
|
||||
types:
|
||||
- completed
|
||||
|
||||
jobs:
|
||||
php-vanity-tags:
|
||||
name: Vanity Tags
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: self-hosted
|
||||
env:
|
||||
latest-stable-version: "7.4"
|
||||
strategy:
|
||||
|
|
|
|||
4
.github/workflows/redis.yml
vendored
4
.github/workflows/redis.yml
vendored
|
|
@ -7,14 +7,14 @@ on:
|
|||
workflow_run:
|
||||
workflows:
|
||||
- Lint Docker Files
|
||||
branches: [master]
|
||||
branches: [ 'master', 'feature/**' ]
|
||||
types:
|
||||
- completed
|
||||
|
||||
jobs:
|
||||
redis-build:
|
||||
name: "Redis with Healthchecks"
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: self-hosted
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: docker/setup-qemu-action@v1
|
||||
|
|
|
|||
4
.github/workflows/wordpress.yml
vendored
4
.github/workflows/wordpress.yml
vendored
|
|
@ -7,14 +7,14 @@ on:
|
|||
workflow_run:
|
||||
workflows:
|
||||
- Build PHP Vanity Tags
|
||||
branches: [master]
|
||||
branches: [ 'master', 'feature/**' ]
|
||||
types:
|
||||
- completed
|
||||
|
||||
jobs:
|
||||
wordpress-build:
|
||||
name: "Bake Wordpress Container"
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: self-hosted
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: docker/setup-qemu-action@v1
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ RUN composer global require -q psy/psysh:@stable && \
|
|||
/usr/local/bin/repl -v && \
|
||||
composer clear-cache
|
||||
|
||||
COPY php+cli/psysh-config.php /root/.config/psysh/config.php
|
||||
COPY cli/psysh-config.php /root/.config/psysh/config.php
|
||||
|
||||
ARG PHP_CORE_VERSION
|
||||
FROM ${PHP_CORE_VERSION} AS php-nginx
|
||||
|
|
@ -20,7 +20,8 @@ ARG PHP_VERSION
|
|||
ARG PHP_MEMORY_LIMIT=128M
|
||||
ARG PHP_DATA_MAX_SIZE=1024M
|
||||
ENV PHPFPM_MAX_CHILDREN=25
|
||||
COPY php+nginx /conf
|
||||
COPY nginx /conf
|
||||
COPY self-signed-certificates /certs
|
||||
|
||||
RUN apt-get -qq update && \
|
||||
# Install pre-dependencies to use apt-key.
|
||||
|
|
@ -76,12 +77,12 @@ RUN apt-get -qq update && \
|
|||
mv /conf/NginxDefault /etc/nginx/sites-enabled/default && \
|
||||
mv /conf/NginxSSL /etc/nginx/sites-enabled/default-ssl && \
|
||||
# Generate self-signed certificates
|
||||
mkdir /certs && \
|
||||
openssl req -x509 -nodes -days 36500 -newkey rsa:2048 \
|
||||
-subj "/C=US/ST=Florida/L=Miami/O=Example Group/CN=example.org" \
|
||||
-keyout /certs/example.key \
|
||||
-out /certs/example.crt \
|
||||
&& \
|
||||
#mkdir /certs && \
|
||||
#openssl req -x509 -nodes -days 36500 -newkey rsa:2048 \
|
||||
# -subj "/C=US/ST=Florida/L=Miami/O=Example Group/CN=example.org" \
|
||||
# -keyout /certs/example.key \
|
||||
# -out /certs/example.crt \
|
||||
#&& \
|
||||
# Create runit service directories
|
||||
mkdir -p /etc/service/nginx \
|
||||
/etc/service/php-fpm \
|
||||
|
|
@ -154,7 +155,7 @@ EXPOSE 80
|
|||
HEALTHCHECK --interval=30s --timeout=3s \
|
||||
CMD curl -f http://localhost/ || exit 1
|
||||
|
||||
COPY php+apache /conf
|
||||
COPY apache /conf
|
||||
RUN rm -fr /var/www/html && \
|
||||
ln -s /app /var/www/html && \
|
||||
mv /conf/ApacheConfig.conf /etc/apache2/sites-enabled/000-default.conf && \
|
||||
|
|
|
|||
22
php/self-signed-certificates/example.crt
Normal file
22
php/self-signed-certificates/example.crt
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
-----BEGIN CERTIFICATE-----
|
||||
MIIDnTCCAoWgAwIBAgIUJYUUmBQ2/ERZ7xinAJzVhiFWViYwDQYJKoZIhvcNAQEL
|
||||
BQAwXTELMAkGA1UEBhMCVVMxEDAOBgNVBAgMB0Zsb3JpZGExDjAMBgNVBA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sRpIilaSy8TcbrHkDIaWA5WCdVFfcayDGYdjhCYLGW
|
||||
tj/48g0THvJv6JvVYwFJqTM690YUSlxaOHQE2ZneLytocVyAdEL2MMldRezvtI1z
|
||||
1OXOia2G7koNYtS7cD8G1IM=
|
||||
-----END CERTIFICATE-----
|
||||
28
php/self-signed-certificates/example.key
Normal file
28
php/self-signed-certificates/example.key
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
-----BEGIN PRIVATE KEY-----
|
||||
MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQDSWvTnKAlvpno/
|
||||
KgzAgkxp6jALlKgSI9cGS4DnU+Ax64qtbyotSS7A2ZGHpKwqv7H1qPe5A17HSumD
|
||||
ePprmuRDeHExt5kqWpfkYC03NhzChxX4Mz8yDf5+QBKs3VWW+Y9D9y6FDR+vOwJa
|
||||
ZVtAQfiuuBsP/9ij8dEPBZIatiPe1fEkaanbO/DyR84X7mTbPwFBaRV52BycjtkO
|
||||
twbatmqEzEMqCw0QQcYp+9CCNugo4d5OhITGPh7mEtQI3yPHA0MNvPWrCQS2usz6
|
||||
A9FRmhjXwkqzs8a1Kn4SKDpLmFu6ziLCuq0krtZ3kikCIji1Y0MYn8a0CCCk0IUY
|
||||
kqZYA/S1AgMBAAECggEARqfQjPgwuzTi6OZ55AugGQ9VVf53uagaKH4h7RGKQ5pH
|
||||
OVwWgaGMN7CcpkAUqEM9RjOcCaPtKOmrp8Jx8sTTGSqScs2lf8lwLYB0j4/4dwqi
|
||||
wXyNJIX4znU9EJ1Di3OFwKF9Gam/077xWmWjEeFW43DpfiVEokSuIOqRGbHGOKlt
|
||||
2ygHJu+rmPapEPyYqSWQnAkYX0DW/KCAGiyIAqph/SgrCDTdsxbNOa2OwDygPC54
|
||||
7xW0yCduvgFLh9bxedF8iifzRkPw710cxyqVsYwHiwugDgxL4NiK1DlWbpBimab5
|
||||
ocye9+ElymMZ8DTjpA85cXny/TtoqJfqTs1YGYgrvQKBgQDwHnAcY0BjQ4o+ZneG
|
||||
oqBJeQ8KCMRU4pEIa5QOOeUr46gtiPIfcFh/BJUHQ61qk7gcJj5BV2GXNS7+m+sU
|
||||
RC3Usblm9twwxZn7mfoOk4z9NEfBI2MXmbB8ARjAQBCost+3KQAoSIL1AyDKiAlY
|
||||
2JfMt+73+kwUsg7b9g0pYIfn/wKBgQDgRJPlSIxJs2mbjzUwVBAeslct2W0dehrh
|
||||
V0sXPxEhJHWX6P343vLqRHRsKgqhbU/vy+3JrIS9ftwGKcmb+Y9EJgYrR+D3ZYzs
|
||||
idSOsunSspJgbCG5mHE1VQhr8IpHeCkuSt22aFErLfsjzXWZIewK2tqZN1QUjdc5
|
||||
EJHOD4UDSwKBgFYRYvgZ72NlOzFAw0kkE7YiSWy8Vbtjdr8A6JHs2KNRt9+Sfc8d
|
||||
Eut8dfqjnI5eIpkccCY1rwpnCtBCjRG3moHprl4k0Co/OgGAYKxG4TuFOM8W4xb7
|
||||
hNH+BqQqko4Vh7D8Zk0KKL6v/1n5RvhssoSzzVlfg1PLux3G5VLWggB7AoGAAP/N
|
||||
OORN27Y07kCBGCoHuFtLECU72znEDOT6rKvXQ7KJ45diKk2z/182tZSqX3XBOWxL
|
||||
Lu7Z2I5MJKri/xLplIAm3uJ/GhsVuagTjl81s36gMFXLAKyxNG+gjfqQYykh5dbn
|
||||
jfyBABRAXjR4JaqFBrda6fvZIA5RuytbuvNOwGkCgYAUs82tDGLiqyMPd2jgYS3k
|
||||
aL62f0TLKHjmTCmRca7IqXbqcMbAj+LgAHI2HfCfjc4KWd68ZGRLcpDlehMcis1f
|
||||
PQi3HW+2b9dAZX6+HAIGiVem//ckYXgUza4MMosh0hXquGs1yJ/VNWC+HPIHrj6X
|
||||
9tvvvHnGKav329q/Z/8K/A==
|
||||
-----END PRIVATE KEY-----
|
||||
Loading…
Reference in a new issue