Server configuration

This commit is contained in:
Oleg Lavrovsky 2019-09-11 09:00:12 +02:00
parent 727a722770
commit a039510d7f
3 changed files with 69 additions and 57 deletions

View File

@ -70,7 +70,6 @@ logs:
docker-compose logs -f --tail=500 docker-compose logs -f --tail=500
backup: backup:
docker-compose start postgres
docker-compose exec web ./manage.py dumpdata --natural-foreign -e auth.permission -e contenttypes -e wagtailcore.GroupCollectionPermission -e wagtailimages.rendition -e sessions -e feedler.feedlysettings > ~/publichealth.home.json docker-compose exec web ./manage.py dumpdata --natural-foreign -e auth.permission -e contenttypes -e wagtailcore.GroupCollectionPermission -e wagtailimages.rendition -e sessions -e feedler.feedlysettings > ~/publichealth.home.json
zip ~/publichealth.home.json.`date +"%d%m%Y-%H%M"`.zip ~/publichealth.home.json zip ~/publichealth.home.json.`date +"%d%m%Y-%H%M"`.zip ~/publichealth.home.json
rm ~/publichealth.home.json rm ~/publichealth.home.json

View File

@ -1,32 +1,45 @@
$ANSIBLE_VAULT;1.1;AES256 $ANSIBLE_VAULT;1.1;AES256
39613133383630663164333437633037383936663266623861313565663964346232643666653332 30626232643339383163393232623961623366323463316261386261306433396537353264656535
6165666665373661643663323337656163373631366135620a663164653335333166333865383139 3762363861393739636564646263396137323534346666640a646433303864656633356266613966
34633364623536663564363536333737316638353266316261393530386330633963336233346336 30356634336230656138396437653034643239643966343866316334343536646264343437346539
6336383237646233630a656337626566373165313264386438636230646438353131623663666236 3734343734313934330a333663333635353230646431343566636432306364336565643864346162
62633739623431656535383166343862646133396630306264636563643536373562363163316135 34393531616636323035666438366461323437316538626539366539333837633363636139353261
38373966323162653330316135333333643637323732663530336432383066316636303231653534 30613332396333613938346563323131323463653331356135383466626362373734336464633033
37333765313830646662663761376266386262323437373230333231616162393961396162383732 37326465363236663834323936386237346364393437353138393836653262656162343964633633
62633431343062316365316361343432373261623439656533393331383735646639646662653133 66333165346562376531663637656135366135663562656436386330636436303164363430336631
36303039383339353961336664343436653066626561393761383733656664663939333233396134 30663935386363326337646461636362383936316461336562356232383034633764623264373161
63393361396334666330376362643732326266336263393730623464333436336436313639613635 63343662643834333464376161666532663639663835633031333562653064333039376132323139
64646237333739373137356262373666356631356632323466383363356366366366666330646230 36373336373161346332343531626130313039303066323364613139636334356131346662353532
63386232663430386139393864626333326331323031313231346630326133353137373565326538 34323032656132363734653466643566646463323163393330396265373638663564643337303431
36633032653637316531353131653235613331333436316365316661313835373563646534353239 37363039306539613839643061326633363764616237353538663432626631336365343463653737
38623338373365623066613832623836626135326235623538396538366663306365666135633264 36316166346337646430373865353433346633646533313762626530646237353730653365663035
34306464663230616538343539653663326339333437303762323066343933326634633530653565 63383366303266626430646639396636343239656636653061383637306437303533383062313135
34663963353562363132396338623435646165393431303364623834636266373164663933633339 34323066633535613562393961303134306131306430343836613565343934323761353066386561
32346536363330303539373461376631613863656366646437343165633464623064396231346137 61646231383433396430323335343530396333346431356134393339306262393933653934663435
30643261346465303137306161613036336339326530306162393165363766353839316262363263 66383730373633326330373239313235643634313737313935666538353432363233366538626634
38303236633436323830356461653234666534646363336463313064386230663763323632313563 66346535313762646132316561393234666565633839306264323565333738663763376563653264
35396233363933333463326333633737333962353830336135386339613564343237363932306362 36666631663335343837376530633337363636663639623937343930313932323765363463626631
31333535376630363739653433663865366566356132633032666562653234373938633031323139 35646436363232323661613761646231353862383736336262616364303861636465366364633762
61306539376464666664316461303966613231646136623937643965326139303461616366333631 37373966363166633739646165333738346534353633313039356336626161323236346436393064
39323638633661623064623334333864633235646131353237663361343839303537306261656131 37323132613836336237373364333032373435666334623436386335613038303632333435336236
66656331316264636261643165643861376330633035386165626166313133376538656166353136 34313039633831326562623135646265383737323361353764616230636464343363306431376531
31303433633134323532646132386130616431383065363832326533653535663763623733353764 38646635353835633032393863333836633963366361383238616239376437303136626238373736
63383061653062353263383739643366363763363635663165353761623832366139643065396565 30333966396431393161386665373432333934646136313735616436353363616532613963353535
31363435613761623538383237346431613335346437616538643462316665656337343832633937 31653338383538323439666264393539646663646435353838636231343336636666323165663736
33663266663163306461626462626132613961626238333538666233613934346631346231363833 39316632353632363232326463666566316437396262316430336538346633663432343330383465
36633138656563643262393764663331333237386164626230383562396663336564663134356632 63393463333034383966343238373964653631643465353163323531356231623130303831643431
39386137343662666166326131363633353536326130396361376138363132363861313832303262 64623037396337613536666361336231333262396434346130633134333434626433633861306364
326364356331366330393435346330373561 37646233643832356162386438373638363831663331656638363165663262383662363965376464
33323666613564343136643734656131646130623061323966326665373239383966383665373931
64306361336534363863303463306163376661323633333030656432313536376462633663343162
34303938633233386164336161366266633334643665626461353134633662326134383061653231
35646430346239326233666432343034373936316433326164633035356337613864376235646235
33616631393432366437343630666566316664386261393463646666653264353862633537303038
61346434376561376233343863383239326564363263313438666235653436303062353334316634
63653262373533633066336338326235393439643264383163336139316166613462623131396138
31303937393432613732306235393738633732643464646131653230653736613539653034643561
33396436366235306138373662636238356331663833303462623263306538386461613038363565
65303130343761376461356239326333616139643133626637323033333466666163666136313233
30636430313662383635346561643433343137303631646134313563663330643635643633333334
33653261613361383534356563333962366136383734623366616662326661333539613163343738
61356234373935316665

View File

@ -5,10 +5,10 @@ web:
volumes: volumes:
- ./:/usr/src/app - ./:/usr/src/app
- {{ django_log_dir }}:/var/log/wagtail - {{ django_log_dir }}:/var/log/wagtail
links: #links:
- redis # - redis
- postgres # - postgres
- elasticsearch # - elasticsearch
ports: ports:
- "5000:5000" - "5000:5000"
environment: environment:
@ -19,25 +19,25 @@ web:
- MAILGUN_DOMAIN={{ django_email_domain }} - MAILGUN_DOMAIN={{ django_email_domain }}
- MAILGUN_FROM={{ django_email_from }} - MAILGUN_FROM={{ django_email_from }}
- DATABASE_URL={{ django_postgres_url }} - DATABASE_URL={{ django_postgres_url }}
- ELASTICSEARCH_URL=http://elasticsearch:9200 - REDIS_URL={{ django_redis_url }}
- REDIS_URL=redis://redis:6379 - ELASTICSEARCH_URL={{ django_elasticsearch_url }}
- LOG_DIR=/var/log/wagtail - LOG_DIR=/var/log/wagtail
redis: # elasticsearch:
image: redis # image: elasticsearch:5
command: ["redis-server", "--appendonly", "yes"] # ports:
restart: on-failure # - "9200:9200"
volumes: # environment:
- {{ redis_data_dir }}:/data # - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ports: # mem_limit: 1g
- "6379:6379" # redis:
postgres: # image: redis
image: postgres # command: ["redis-server", "--appendonly", "yes"]
ports: # restart: on-failure
- "5432:5432" # volumes:
elasticsearch: # - {{ redis_data_dir }}:/data
image: elasticsearch:5 # ports:
ports: # - "6379:6379"
- "9200:9200" # postgres:
environment: # image: postgres
- "ES_JAVA_OPTS=-Xms512m -Xmx512m" # ports:
mem_limit: 1g # - "5432:5432"