docker ready for api (no app yet)

This commit is contained in:
2020-12-14 10:45:47 +01:00
parent 97df594616
commit f697afe63a
14 changed files with 120 additions and 65 deletions
+54 -5
View File
@@ -33,12 +33,13 @@ add to your /etc/hosts :
127.0.0.1 dev.enfrancais.fr
127.0.0.1 dev.phpmyadmin.enfrancais.fr
```
configure your apache vhosts to add a reverse proxy that will redirect the dev.enfrancais.fr to our container
configure your vhosts to add a reverse proxy that will redirect the dev.enfrancais.fr to our container
Apache
```
<Virtualhost *:80>
ServerName dev.enfrancais.fr
ProxyPass / http://127.0.0.1:8880/
ProxyPassReverse / http://127.0.0.1:8880/
ProxyPass / http://127.0.0.1:8990/
ProxyPassReverse / http://127.0.0.1:8990/
ProxyRequests Off
ProxyPreserveHost On
proxy_buffer_size 128k;
@@ -49,8 +50,8 @@ configure your apache vhosts to add a reverse proxy that will redirect the dev.e
```
<Virtualhost *:80>
ServerName dev.phpmyadmin.enfrancais.fr
ProxyPass / http://127.0.0.1:8881/
ProxyPassReverse / http://127.0.0.1:8881/
ProxyPass / http://127.0.0.1:8991/
ProxyPassReverse / http://127.0.0.1:8991/
ProxyRequests Off
ProxyPreserveHost On
proxy_buffer_size 128k;
@@ -58,8 +59,53 @@ configure your apache vhosts to add a reverse proxy that will redirect the dev.e
proxy_busy_buffers_size 256k;
</Virtualhost>
```
nginx
```
server {
listen 80;
server_name dev.enfrancais.fr;
access_log off;
error_log /var/log/nginx/enfrancais/error.log error;
client_max_body_size 100m;
location / {
proxy_pass http://127.0.0.1:8990;
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;
}
}
server {
listen 80;
server_name dev.phpmyadmin.enfrancais.com;
location / {
proxy_pass http://127.0.0.1:8991;
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;
}
}
```
## Docker
### docker-compose pull
pull the latest image of services
```
make pull
```
### build
only before the first run (may take some time)
```
@@ -107,6 +153,9 @@ do not use directly docker or docker-compose to run this instance
use make instead like ```make up```
```makefile
pull:
docker-compose pull
build:
docker-compose build --build-arg USER_UID=$(USER_UID) --build-arg USER_UNAME=$(USER_UNAME) --build-arg USER_GID=$(USER_GID) --build-arg USER_GNAME=$(USER_GNAME)