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 chown 999:999 postgres_data- 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; }
- 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
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