You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
4 years ago | |
|---|---|---|
| docker | 4 years ago | |
| init_db | 4 years ago | |
| README.md | 4 years ago | |
| docker-compose.yml | 4 years ago | |
README.md
PREPARE
Base setup
mkdir letsencrypt nginx_conf.d postgres_data- put site repo into ./treeralker
- put treetalker.guideget.ru.conf nginx config into ./nginx_conf.d
- put
pg_dumpall --clean | gzip > db.out.gzinto ./init_db - fix treetalker/nodejs/config/config.env
HOST=db address - replace
SERVER_IP_OR_DOMAINin tt-parse-service.js and vector-layers-data.js - fix treetalker.guideget.ru.conf:
- replace
proxy_pass http://localhost..directives with container routing - replace
location /ppga {...}block withlocation /ppga/ { proxy_pass http://ppga:8080/; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; access_log /var/log/nginx/ppga.access.log; } - add
locationblocklocation /martin/ { proxy_pass http://martin:3000/; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; }
- replace
Clean up
- delete ./node_modules dirs
- delete react release ./build dir
- remove
default_serverdirective from treetalker.guideget.ru.conf
Dev setup
- put options-ssl-nginx.conf into ./letsencrypt
- replace
$hostentries in treetalker.guideget.ru.conf with your develoment host - replace
treetalker.guideget.ruin source with your develoment host
Prod setup
- disable
USE_LOCAL_CA=1 - put real certs in ./letsencrypt
- remove "1000:443" mapping
- uncomment 80, 443 port mappings
- put real password for postgres in
POSTGRES_PASSWORDandDATABASE_URL
Prepaired archive
curl --location --remote-name https://iamonlyherefortheicecream.ml/treetalker.tar.gztar --extract --file treetalker.tar.gz- replace
SERVER_IP_OR_DOMAINin ./treetalker/src/services/tt-parse-service.js and ./treetalker/src/components/map-page/vector-layers/vector-layers-data.js - put real passwords in docker-compose.yml
RUN
docker-compose build
(watch out for 'npm WARN tar ENOENT: no such file or directory' intermitent failure https://github.com/npm/cli/issues/2319 et al.)
docker-compose up -d