Browse Source

Initial commit

master
Florestan Bredow 6 months ago
parent
commit
3032fe98cf
  1. 2
      LICENSE
  2. 33
      Makefile
  3. 6
      docker-compose.yml
  4. 45
      grav/Dockerfile

2
LICENSE

@ -1,4 +1,4 @@
MIT License Copyright (c) <year> <copyright holders>
MIT License Copyright (c) 2020 Florestan Bredow
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

33
Makefile

@ -0,0 +1,33 @@
SHELL := bash
ifeq ($(origin .RECIPEPREFIX), undefined)
$(error This Make does not support .RECIPEPREFIX. Please use GNU Make 4.0 or later)
endif
.RECIPEPREFIX = >
.DEFAULT_GOAL := help
.PHONY: init upgrade up help clear-log
DC=docker-compose
SETFACL=sudo setfacl -R -m u:${USER}:rwX,d:u:${USER}:rwX
CHOWN=sudo chown -R
WWW=${HOME}/public
init: create-dir set-acl upgrade
create-dir:
> mkdir -p data
set-acl:
> $(SETFACL) data
> $(CHOWN) 33:33 data
upgrade:
> $(DC) pull
> $(DC) build --pull
up:
> $(DC) up
help:
> @printf "Usage : make [init|upgrade|set-acl|up]"

6
docker-compose.yml

@ -0,0 +1,6 @@
grav:
build: grav
ports:
- 80:80
volumes:
- ./data:/var/www/html/user

45
grav/Dockerfile

@ -0,0 +1,45 @@
FROM php:7.4-apache
RUN apt update -y \
&& apt install -y \
libjpeg-dev \
libpng-dev \
libfreetype6-dev \
libzip-dev \
libonig-dev \
libcurl4-openssl-dev \
libxml2-dev \
wget \
bsdtar \
&& apt clean \
&& rm /var/cache/* -r
RUN docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j$(nproc) \
curl \
ctype \
dom \
gd \
json \
mbstring \
session \
simplexml \
xml \
zip \
sockets \
opcache
RUN wget -O /tmp/grav.zip https://getgrav.org/download/core/grav-admin/1.6.28 \
&& cd /var/www/html \
&& bsdtar --strip-components=1 -xvf /tmp/grav.zip \
&& cd -
RUN cd /var/www/html \
&& bin/gpm selfupgrade -f \
&& bin/gpm update -f \
&& cd -
RUN a2enmod rewrite
RUN chown -R www-data:www-data /var/www/html \
&& chmod -R ug+rwX /var/www/html
Loading…
Cancel
Save