Skip to content

Commit 31d5c77

Browse files
committed
first agdsn version of padlist
1 parent 32d483a commit 31d5c77

14 files changed

+342
-29
lines changed

Diff for: .github/workflows/buld.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Padlist Build and Push to GitHub Container Registry (ghcr.io)
2+
on: [push, workflow_dispatch]
3+
jobs:
4+
build:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- name: Checkout
8+
uses: actions/checkout@v2
9+
10+
- name: Login to GitHub Packages
11+
uses: docker/login-action@v1
12+
with:
13+
registry: ghcr.io
14+
username: ${{ github.actor }}
15+
password: ${{ github.token }}
16+
17+
- name: Build the Docker image
18+
run: docker build -t ghcr.io/agdsn/padlist:${GITHUB_REF_NAME} .
19+
20+
- name: Push to Github registry
21+
run: docker push ghcr.io/agdsn/padlist:${GITHUB_REF_NAME}

Diff for: .gitignore

-2
This file was deleted.

Diff for: Dockerfile

+80
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# syntax=docker/dockerfile:1
2+
3+
# Comments are provided throughout this file to help you get started.
4+
# If you need more help, visit the Dockerfile reference guide at
5+
# https://docs.docker.com/go/dockerfile-reference/
6+
7+
################################################################################
8+
9+
# Create a stage for installing app dependencies defined in Composer.
10+
FROM composer:lts as deps
11+
12+
WORKDIR /app
13+
14+
# If your composer.json file defines scripts that run during dependency installation and
15+
# reference your application source files, uncomment the line below to copy all the files
16+
# into this layer.
17+
# COPY . .
18+
19+
# Download dependencies as a separate step to take advantage of Docker's caching.
20+
# Leverage a bind mounts to composer.json and composer.lock to avoid having to copy them
21+
# into this layer.
22+
# Leverage a cache mount to /tmp/cache so that subsequent builds don't have to re-download packages.
23+
RUN --mount=type=bind,source=composer.json,target=composer.json \
24+
--mount=type=bind,source=composer.lock,target=composer.lock \
25+
--mount=type=cache,target=/tmp/cache \
26+
composer install --no-dev --no-interaction
27+
28+
################################################################################
29+
30+
# Create a new stage for running the application that contains the minimal
31+
# runtime dependencies for the application. This often uses a different base
32+
# image from the install or build stage where the necessary files are copied
33+
# from the install stage.
34+
#
35+
# The example below uses the PHP Apache image as the foundation for running the app.
36+
# By specifying the "8.3-apache" tag, it will also use whatever happens to be the
37+
# most recent version of that tag when you build your Dockerfile.
38+
# If reproducability is important, consider using a specific digest SHA, like
39+
# php@sha256:99cede493dfd88720b610eb8077c8688d3cca50003d76d1d539b0efc8cca72b4.
40+
FROM php:8.3-apache as final
41+
42+
RUN apt-get update && apt-get install -y libpq-dev && docker-php-ext-install pdo pdo_pgsql
43+
44+
# Your PHP application may require additional PHP extensions to be installed
45+
# manually. For detailed instructions for installing extensions can be found, see
46+
# https://github.com/docker-library/docs/tree/master/php#how-to-install-more-php-extensions
47+
# The following code blocks provide examples that you can edit and use.
48+
#
49+
# Add core PHP extensions, see
50+
# https://github.com/docker-library/docs/tree/master/php#php-core-extensions
51+
# This example adds the apt packages for the 'gd' extension's dependencies and then
52+
# installs the 'gd' extension. For additional tips on running apt-get, see
53+
# https://docs.docker.com/go/dockerfile-aptget-best-practices/
54+
# RUN apt-get update && apt-get install -y \
55+
# libfreetype-dev \
56+
# libjpeg62-turbo-dev \
57+
# libpng-dev \
58+
# && rm -rf /var/lib/apt/lists/* \
59+
# && docker-php-ext-configure gd --with-freetype --with-jpeg \
60+
# && docker-php-ext-install -j$(nproc) gd
61+
#
62+
# Add PECL extensions, see
63+
# https://github.com/docker-library/docs/tree/master/php#pecl-extensions
64+
# This example adds the 'redis' and 'xdebug' extensions.
65+
# RUN pecl install redis-5.3.7 \
66+
# && pecl install xdebug-3.2.1 \
67+
# && docker-php-ext-enable redis xdebug
68+
69+
# Use the default production configuration for PHP runtime arguments, see
70+
# https://github.com/docker-library/docs/tree/master/php#configuration
71+
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
72+
73+
# Copy the app dependencies from the previous install stage.
74+
COPY --from=deps app/vendor/ /var/www/html/vendor
75+
# Copy the app files from the app directory.
76+
COPY src /var/www/html
77+
78+
# Switch to a non-privileged user (defined in the base image) that the app will run under.
79+
# See https://docs.docker.com/go/dockerfile-user-best-practices/
80+
USER www-data

Diff for: README.Docker.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
### Building and running your application
2+
3+
When you're ready, start your application by running:
4+
`docker compose up --build`.
5+
6+
Your application will be available at http://localhost:9000.
7+
8+
### Deploying your application to the cloud
9+
10+
First, build your image, e.g.: `docker build -t myapp .`.
11+
If your cloud uses a different CPU architecture than your development
12+
machine (e.g., you are on a Mac M1 and your cloud provider is amd64),
13+
you'll want to build the image for that platform, e.g.:
14+
`docker build --platform=linux/amd64 -t myapp .`.
15+
16+
Then, push it to your registry, e.g. `docker push myregistry.com/myapp`.
17+
18+
Consult Docker's [getting started](https://docs.docker.com/go/get-started-sharing/)
19+
docs for more detail on building and pushing.

Diff for: compose.yaml

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Comments are provided throughout this file to help you get started.
2+
# If you need more help, visit the Docker compose reference guide at
3+
# https://docs.docker.com/go/compose-spec-reference/
4+
5+
# Here the instructions define your application as a service called "server".
6+
# This service is built from the Dockerfile in the current directory.
7+
# You can add other services your application may depend on here, such as a
8+
# database or a cache. For examples, see the Awesome Compose repository:
9+
# https://github.com/docker/awesome-compose
10+
services:
11+
server:
12+
build:
13+
context: .
14+
ports:
15+
- 9000:80
16+
develop:
17+
watch:
18+
- action: sync
19+
path: ./src
20+
target: /var/www/html
21+
environment:
22+
- HEDGEDOC_URL=
23+
# Database
24+
- DB_HOST=
25+
- DB_NAME=
26+
- DB_USER=
27+
- DB_PASSWORD=
28+
# Keycloak
29+
- KEYCLOAK_AUTH_SERVER_URL=
30+
- KEYCLOAK_REALM=
31+
- KEYCLOAK_CLIENT_ID=
32+
- KEYCLOAK_CLIENT_SECRET=
33+
- KEYCLOAK_REDIRECT_URI=
34+
# The commented out section below is an example of how to define a PostgreSQL
35+
# database that your application can use. `depends_on` tells Docker Compose to
36+
# start the database before your application. The `db-data` volume persists the
37+
# database data between container restarts. The `db-password` secret is used
38+
# to set the database password. You must create `db/password.txt` and add
39+
# a password of your choosing to it before running `docker-compose up`.
40+
# depends_on:
41+
# db:
42+
# condition: service_healthy
43+
# db:
44+
# image: postgres
45+
# restart: always
46+
# user: postgres
47+
# secrets:
48+
# - db-password
49+
# volumes:
50+
# - db-data:/var/lib/postgresql/data
51+
# environment:
52+
# - POSTGRES_DB=example
53+
# - POSTGRES_PASSWORD_FILE=/run/secrets/db-password
54+
# expose:
55+
# - 5432
56+
# healthcheck:
57+
# test: [ "CMD", "pg_isready" ]
58+
# interval: 10s
59+
# timeout: 5s
60+
# retries: 5
61+
# volumes:
62+
# db-data:
63+
# secrets:
64+
# db-password:
65+
# file: db/password.txt
66+

Diff for: composer.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"require": {
3-
"league/oauth2-client": "^2.7"
3+
"league/oauth2-client": "^2.7",
4+
"stevenmaguire/oauth2-keycloak": "^5.1"
45
}
56
}

Diff for: composer.lock

+126-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: providerConfig.sample.php

-18
This file was deleted.

Diff for: src/.htaccess

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
RedirectMatch 403 /vendor(/.*|$)

Diff for: callback.php renamed to src/callback.php

File renamed without changes.

0 commit comments

Comments
 (0)