説明なし

ouidade 438501e4d5 ajout Chloé Listrat 3 年 前
Docker 0dd3c18707 updated php to 7.4, updated grav to 1.7.14 3 年 前
log 7d3f95fa25 added log/nginx to git tree 3 年 前
public_html @ bd4137e00d 0dd3c18707 updated php to 7.4, updated grav to 1.7.14 3 年 前
ressources 0dd3c18707 updated php to 7.4, updated grav to 1.7.14 3 年 前
.env 0dd3c18707 updated php to 7.4, updated grav to 1.7.14 3 年 前
.gitignore e627bba6b9 docker env working 5 年 前
.gitkeep 438501e4d5 ajout Chloé Listrat 3 年 前
.gitmodules e149ad5f70 changed gitmodule remote path 3 年 前
LICENSE e627bba6b9 docker env working 5 年 前
README.md a5cb506898 fix redame 3 年 前
docker-compose.yml 0dd3c18707 updated php to 7.4, updated grav to 1.7.14 3 年 前

README.md

figureslibres.cc

Figureslibres.cc powered by grav in docker environement (nginx, php:7.0-fpm)

Install docker

sudo pacman -S docker docker-compose docker-machine

Clone this repos

this will clone this repos (main docker environement) and the grav source code

git clone --recursive -o figli https://figureslibres.io/gogs/bachir/docker-figureslibres.cc-grav.git

Hosts and reverse proxy

add to your /etc/hosts :

127.0.0.1	dev.figureslibres.cc

configure your vhosts to add a reverse proxy that will redirect the domain dev.figureslibres.com to our container

nginx

edit /etc/nginx/sites-available/dev.figureslibres.cc.conf with :

server {
  listen 80;
  server_name dev.figureslibres.cc;
  location / {
    proxy_pass http://127.0.0.1:8882;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_buffer_size          128k;
    proxy_buffers              4 256k;
    proxy_busy_buffers_size    256k;
  }
}

then activate the vhost

sudo ln -s /etc/nginx/sites-available/dev.figureslibres.cc.conf /etc/nginx/sites-enabled/
sudo systemctl restart nginx

Apache

<Virtualhost *:80>
   ServerName dev.figuresmibres.cc
   ProxyPass / http://127.0.0.1:8882/
   ProxyPassReverse / http://127.0.0.1:8882/
   ProxyRequests Off
</Virtualhost>

Docker

start daemon

launch the docker daemon

sudo systemctl start docker

build

only before the first run (may take some time)

sudo docker-compose build --no-cache

run

then each time you want to launch the app

sudo docker-compose up -d

check if containers are running

sudo docker-compose ps

check the logs

sudo docker-compose logs -f

install grav

# log into the php container
sudo docker exec -it figureslibrescc_php_1 bash
# install grav using cli
bin/grav install

fixing permissions

# log into the php container
sudo docker exec -it figureslibrescc_php_1 bash
# run the script
./fixperms.sh

Pages

fill the /user/pages with your contents or you'll get a 404 error

Visualize

You can now visit http://dev.figureslibres.cc or simply http://localhost:8882 on your browser

Updating code

git pull figli master
# then update all submodules
git submodule update --recursive --checkout