No Description

bach 8c9cd87d8e fixed public_html .gitmodules 3 years ago
Docker 194fc828dc updated / improvement 4 years ago
log 7d3f95fa25 added log/nginx to git tree 3 years ago
public_html @ f8b2b21c51 8c9cd87d8e fixed public_html .gitmodules 3 years ago
.env 194fc828dc updated / improvement 4 years ago
.gitignore e627bba6b9 docker env working 5 years ago
.gitmodules e149ad5f70 changed gitmodule remote path 3 years ago
LICENSE e627bba6b9 docker env working 5 years ago
README.md 4119432eee readme updat code 3 years ago
docker-compose.yml e627bba6b9 docker env working 5 years ago

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

server {
  listen 80;
  server_name dev.figureslibres.io;
  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;
  }
}

Apache

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

Updating code

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

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

run

then each time you want to launch the app

sudo docker-compose up -d

login the php environement to user the grav cli tools

sudo docker exec -it grav_figureslibres.cc_php_1 bash

fixing permissions

from the grav_figureslibres.cc_php_1 run the fixeperms.sh script

sudo docker exec -it grav_figureslibres.cc_php_1 bash
chmod +x fixperms.sh
./fixeperms.sh

Visualize

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