new
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# docker
|
||||
# epau.archi.fr
|
||||
|
||||
Docker php 7.3fpm nginx
|
||||
epau.archi.fr powered by grav in docker environement (nginx, php:7.0-fpm)
|
||||
|
||||
## Install docker
|
||||
```
|
||||
@@ -12,21 +12,47 @@ sudo pacman -S docker docker-compose docker-machine
|
||||
this will clone this repos (main docker environement) and the grav source code
|
||||
|
||||
```
|
||||
git clone --recursive -o figli https://figureslibres.io/gogs/kevin/docker-grav.git
|
||||
git clone --recursive -o figli https://figureslibres.io/gogs/ouidade/docker-epau.archi.fr-grav.git
|
||||
```
|
||||
|
||||
## Hosts and reverse proxy
|
||||
|
||||
add to your /etc/hosts :
|
||||
```
|
||||
127.0.0.1 dev.docker-grav.net
|
||||
127.0.0.1 dev.epau.archi.fr
|
||||
```
|
||||
configure your apache vhosts to add a reverse proxy that will redirect the dev.materio.com to our container
|
||||
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.epau.archi.fr.conf``` with :
|
||||
```nginx
|
||||
server {
|
||||
listen 80;
|
||||
server_name dev.epau.archi.fr;
|
||||
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
|
||||
```sh
|
||||
sudo ln -s /etc/nginx/sites-available/dev.epau.archi.fr.conf /etc/nginx/sites-enabled/
|
||||
sudo systemctl restart nginx
|
||||
```
|
||||
|
||||
### Apache
|
||||
```apache
|
||||
<Virtualhost *:80>
|
||||
ServerName dev.docker-grav.net
|
||||
ProxyPass / http://127.0.0.1:8880/
|
||||
ProxyPassReverse / http://127.0.0.1:8880/
|
||||
ServerName dev.epau.archi.fr
|
||||
ProxyPass / http://127.0.0.1:8882/
|
||||
ProxyPassReverse / http://127.0.0.1:8882/
|
||||
ProxyRequests Off
|
||||
</Virtualhost>
|
||||
```
|
||||
@@ -41,18 +67,53 @@ sudo systemctl start docker
|
||||
### build
|
||||
only before the first run (may take some time)
|
||||
```
|
||||
sudo docker-compose build
|
||||
sudo docker-compose build --no-cache
|
||||
```
|
||||
### run
|
||||
then each time you want to launch the app
|
||||
```
|
||||
sudo docker-compose up -d
|
||||
```
|
||||
### loging in
|
||||
|
||||
### check if containers are running
|
||||
```
|
||||
sudo docker exec -it docker-grav_php_1 bash
|
||||
sudo docker-compose ps
|
||||
```
|
||||
|
||||
### check the logs
|
||||
```
|
||||
sudo docker-compose logs -f
|
||||
```
|
||||
|
||||
### install grav
|
||||
```
|
||||
# log into the php container
|
||||
sudo docker exec -it epauarchifr_php_1 bash
|
||||
# install grav using cli
|
||||
bin/grav install
|
||||
|
||||
```
|
||||
|
||||
### fixing permissions
|
||||
|
||||
```
|
||||
# log into the php container
|
||||
sudo docker exec -it epauarchifr_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.docker-grav.fr or simply http://localhost:8880 on your browser
|
||||
After the first run
|
||||
You can now visit http://dev.epau.archi.fr or simply http://localhost:8882 on your browser
|
||||
|
||||
|
||||
## Updating code
|
||||
|
||||
```
|
||||
git pull figli master
|
||||
# then update all submodules
|
||||
git submodule update --recursive --checkout
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user