Skip to content

Commit

Permalink
Added magoe webapp
Browse files Browse the repository at this point in the history
  • Loading branch information
rgaudin committed Nov 29, 2023
1 parent 0418010 commit 3a5af09
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/docker_magoe.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Publish magoe Image

on:
push:
branches:
- 'main'
paths:
- 'magoe/*'
tags:
- 'magoe-*'

jobs:
magoe:
name: Publish magoe Image
runs-on: ubuntu-22.04
steps:
- uses: actions/[email protected]
- name: Publish magoe Image
uses: openzim/docker-publish-action@v10
with:
image-name: offspot/magoe
on-master: dev
build-args:
VERSION={tag}
tag-pattern: /^magoe-([0-9.]+)$/
restrict-to: offspot/container-images
platforms: |
linux/amd64
linux/arm64
context: magoe
registries: ghcr.io
credentials:
GHCRIO_USERNAME=${{ secrets.GHCR_USERNAME }}
GHCRIO_TOKEN=${{ secrets.GHCR_TOKEN }}
23 changes: 23 additions & 0 deletions magoe/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM alpine:3.18
LABEL org.opencontainers.image.source https://github.com/offspot/container-images

COPY httpd-foreground entrypoint /usr/local/bin/

RUN apk add --no-cache \
dumb-init \
php81-apache2 \
php81-curl php81-gd php81-pdo_sqlite php81-session php81-sqlite3 php81-mbstring \
&& mkdir -p /var/www/magoe \
&& printf "\n\
ServerName magoe;\n\
ErrorLog /dev/stderr\n\
CustomLog /dev/stdout combined\n\
\n" >> /etc/apache2/conf.d/default.conf

VOLUME /var/www/magoe
EXPOSE 80
STOPSIGNAL SIGWINCH
ENV MAGOE_URL http://localhost

ENTRYPOINT ["/usr/bin/dumb-init", "--", "/usr/local/bin/entrypoint"]
CMD ["httpd-foreground"]
5 changes: 5 additions & 0 deletions magoe/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Magoe Éducation Guinée

Leçons et exercices interactifs basés sur https://magoe.fr

cf. https://github.com/offspot/package-requests/issues/34
7 changes: 7 additions & 0 deletions magoe/entrypoint
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh
set -e

mkdir -p /var/www/html
chown -R apache:apache /var/www/html

exec "$@"
7 changes: 7 additions & 0 deletions magoe/httpd-foreground
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh
set -e

# Apache gets grumpy about PID files pre-existing
rm -f /usr/local/apache2/logs/httpd.pid

exec httpd -DFOREGROUND "$@"

0 comments on commit 3a5af09

Please sign in to comment.