Commit f04c3bd7 authored by PkSM3's avatar PkSM3

real-world setup details

parent 244b0214
# Full server config: php comex as root and regcomex as subpath
# =============================================================
server {
listen 80 ;
listen [::]:80 ;
# in production
# server_name communityexplorer.org
server_name _;
# adapt path to your php docroot
root /var/www ;
location / {
index index.html index.php ;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
# here we adapted $documentroot to our real php docroot
fastcgi_param SCRIPT_FILENAME /var/www/$fastcgi_script_name;
# ---------
}
# no root here => independant app
# (but /locationpath must match this app's default route)
location /regcomex {
# point to app container's redirected port
proxy_pass http://0.0.0.0:32790;
proxy_redirect off;
# useful to keep track of original IP before reverse-proxy
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-Host $server_name;
# get the logs in a custom place
# (adapt paths)
access_log /home/ubuntu/active_webapps/regcomex/logs/nginx/access.log ;
# error_log /home/ubuntu/active_webapps/regcomex/logs/nginx/error.log debug;
error_log /home/ubuntu/active_webapps/regcomex/logs/nginx/error.log ;
}
# faster static serving
location /static {
alias /home/ubuntu/active_webapps/regcomex/static;
autoindex on;
}
location ~ /\.ht {
deny all;
}
#location /testdocker {
# proxy_pass http://0.0.0.0:32789;
# proxy_redirect off;
# 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-Host $server_name;
#}
}
...@@ -22,4 +22,7 @@ docker run --detach \ ...@@ -22,4 +22,7 @@ docker run --detach \
# get the ip into SQL_HOST # get the ip into SQL_HOST
export SQL_HOST=$(docker inspect comex_db | jq -r '.[0].NetworkSettings.IPAddress') export SQL_HOST=$(docker inspect comex_db | jq -r '.[0].NetworkSettings.IPAddress')
# variant if run by docker-compose
export SQL_HOST=$(sudo docker inspect dockers_comex_db_test_1 | jq -r '.[0].NetworkSettings.Networks.dockers_default.IPAddress')
``` ```
...@@ -612,16 +612,16 @@ var passwords = [pass1, pass2] ...@@ -612,16 +612,16 @@ var passwords = [pass1, pass2]
// £DEBUG autofill ----------->8------ // £DEBUG autofill ----------->8------
first_name.value = "Jean" //first_name.value = "Jean"
last_name.value = "Tartampion" //last_name.value = "Tartampion"
initialsInput.value="JPP" //initialsInput.value="JPP"
document.getElementById('country').value = "France" //document.getElementById('country').value = "France"
email.value= makeRandomString(10)+"@om.fr" //email.value= makeRandomString(10)+"@om.fr"
pass1.value="123456+789" //pass1.value="123456+789"
pass2.value="123456+789" //pass2.value="123456+789"
document.getElementById('jobtitle').value = "atitle" //document.getElementById('jobtitle').value = "atitle"
document.getElementById('keywords').value = "Blabla" //document.getElementById('keywords').value = "Blabla"
document.getElementById('institution').value = "CNRS" //document.getElementById('institution').value = "CNRS"
// --------------------------->8------ // --------------------------->8------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment