# 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.gz` into ./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 with ```nginx location /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; } ``` ## Clean up - delete ./node_modules dirs - delete react release ./build dir - remove `default_server` directive from treetalker.guideget.ru.conf ## Dev setup - put options-ssl-nginx.conf into ./letsencrypt - replace `$host` entries in treetalker.guideget.ru.conf with your develoment host - replace `treetalker.guideget.ru` in 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`