Commit Graph

206 Commits

Author SHA1 Message Date
wiz
beb834bc30
Update syslog.conf and upgrade/restart scripts for new keybase channels 2021-09-02 19:30:54 +09:00
wiz
ca6df488c5
Fix missing fetch command in upgrade script 2021-08-21 21:56:42 +09:00
wiz
1e018a6aa5
Fix typo/bug in mempool-logger script 2021-08-21 15:39:15 +09:00
wiz
0a627f96be
Tweak production syslog configuration 2021-08-21 15:19:29 +09:00
wiz
17a8e67d8a
Modify restart script to log restart events, don't restart services 2021-08-21 15:06:50 +09:00
wiz
815c2c5ad5
Modify upgrade script for PR branch deployment, tweak logging 2021-08-21 14:51:19 +09:00
wiz
7e89de4612
Send deployment notifications to mempool.dev keybase group 2021-08-20 21:52:54 +09:00
wiz
8bfd315ba3
Rewrite production upgrade script to handle all 3 sites 2021-08-14 06:03:30 +09:00
wiz
994eb378af
Update production nginx-mempool.conf for donations API endpoint 2021-08-11 01:00:17 +09:00
wiz
1223c58a98
Add missing --db-dir option in electrs-start-liquid script 2021-08-08 05:18:11 +09:00
wiz
7d3757676f
Enable 'ca' locale for Catalan 2021-08-08 01:05:42 +09:00
wiz
857a5ff6fc
Add missing asset_registry_db repo path for liquid electrs backend
Fixes #649
2021-07-29 17:49:42 +09:00
wiz
59898f1269
Patch sysconf dep for blockstream/electrs build in start scripts 2021-07-25 15:20:35 +09:00
wiz
f2f5749769
Update nginx configuration for cache settings and new locales
* Consolidates add_header statements into single top-level section
* Updates locales to match frontend/src/app/app.constants.ts
* Re-orders locales to match locale selector for easier checking
2021-07-19 18:36:13 +09:00
wiz
74c49b9ae7
Enable i18n locale for Russian (ru) 2021-06-13 15:05:21 -05:00
wiz
c09eb651ef
Add production/nginx-bisq.conf for bisq.markets usage 2021-05-11 14:18:25 +09:00
wiz
f281e84396
Disable caching of electrs endpoints in production/nginx.conf 2021-05-06 21:20:13 +09:00
wiz
0d03a9e6cc
Send HTTP header Vary: Cookie to prevent localization cache bug
Fixes #477
2021-04-27 19:00:33 +09:00
softsimon
3a957ece05
Merge branch 'master' into simon/bisq-dashboard
# Conflicts:
#	frontend/src/locale/messages.xlf
2021-04-26 01:41:07 +04:00
wiz
6dbfcc9d1a
Enable i18n for Polish language 2021-04-26 05:43:47 +09:00
softsimon
5878a2e631
Unified Bisq config 2021-04-25 02:38:46 +04:00
wiz
d51ea54ab9
Add production FreeBSD tuning parameters to increase network buffers 2021-04-16 00:12:29 +09:00
wiz
3300f0e8d3
Set production backend config "CLEAR_PROTECTION_MINUTES": 5 2021-04-15 21:44:38 +09:00
wiz
d5cc558670
Modify nginx.conf to cache HTML for 10m and static resources for 1h
Fixes #61
2021-03-08 18:50:57 +09:00
wiz
a52f98c39d
Proxy /api/v1/contributors from mempool.space, also fix HTTP headers
Fixes #366
2021-03-08 18:34:04 +09:00
wiz
892cebd8f4
Enable sending CORS headers from electrs backend in startup script
Fixes #367
2021-03-03 21:29:18 +09:00
softsimon
a3d9e87f0e
Adding Hebrew language 2021-02-25 17:16:22 +07:00
wiz
6a7d5fbe6a
Don't start production instances if backend folder doesn't exist 2021-02-25 02:38:38 +09:00
wiz
619eee9492
Improve production high availability using structured failover and cache 2021-02-23 13:33:52 +09:00
wiz
c9f2bd4029
Update nginx and mempool backend configuration for active failover HA 2021-02-22 20:22:38 +09:00
wiz
0b79aaaf2f
Don't use rust from rustup, use OS package rust instead 2021-02-21 03:44:54 +09:00
wiz
7d858a8abd
Modify production startup scripts to support signet 2021-02-21 03:44:33 +09:00
wiz
32af9420dc
Update production frontend/backend config to support signet 2021-02-21 03:41:52 +09:00
wiz
7195d6ea31
Update nginx.conf for signet, services, and disable SSR for now 2021-02-21 03:39:19 +09:00
softsimon
edce0d118a
Updating mempool logo and adding new mempool space logo. New frontend config OFFICIAL_MEMPOOL_SPACE to enable the latter.
fixes #336
2021-02-18 13:34:05 +07:00
wiz
befb192651
Reduce backend heap size setting to 2G since cache memory usage was optimized (#345)
On powerful servers, nodejs automatically sets the limit at 4GB
```
% node -e 'console.log(`node heap limit = ${require("v8").getHeapStatistics().heap_size_limit / (1024 * 1024)} Mb`)'
node heap limit = 4144 Mb
```

On a Raspberry Pi with 8GB RAM, nodejs automatically sets the limit at 1GB
```
% node -e 'console.log(`node heap limit = ${require("v8").getHeapStatistics().heap_size_limit / (1024 * 1024)} Mb`)'
node heap limit = 1048 Mb
```

On a Raspberry Pi with 4GB RAM, nodejs automatically sets the limit at 740MB
```
% node -e 'console.log(`node heap limit = ${require("v8").getHeapStatistics().heap_size_limit / (1024 * 1024)} Mb`)'
node heap limit = 739.4694900512695 Mb
```

After testing with manually setting the limit to 768MB, mempool starts
up fine, but crashes when saving the cache when the mempool is quite
large (over 400MB with custom bitcoin.conf setting).

So it's probably safe to reduce the 4GB limit setting to 2GB for
all devices and and just use the automatically set values, now that the
backend's disk cache memory usage was recently optimized.

However, a new npm script for `npm run start-production` will be added
so we can keep our production mempool.space servers running with a very
large bitcoin.conf mempool
2021-02-14 22:25:29 +07:00
wiz
378a56b2c7
Set production electrs scripts to store db in /electrs 2021-02-04 15:53:08 +09:00
wiz
8e42d573ee
Modify production electrs scripts to use relative paths from homedir 2021-02-04 12:17:28 +09:00
wiz
d3646aa45e
Fix production nginx.conf and backend config to always use unique ports 2021-01-31 01:16:32 +09:00
wiz
6a9c4d82ec
Rename production syslog notifications channel 2021-01-30 23:40:46 +09:00
wiz
42ad068dd2
Configure production backends and nginx for high availability electrs 2021-01-30 23:01:01 +09:00
softsimon
9d317082e1
Replacing localhost with 127.0.0.1 2021-01-30 18:43:58 +07:00
wiz
edf8f1fc8a
Update production upgrade script notification command 2021-01-30 20:31:47 +09:00
wiz
ad52e7fe7e
Update production syslog scripts 2021-01-30 20:09:47 +09:00
softsimon
47dd1f2d0b
Adding Italian language. Updating nginx conf with some missing languages. 2021-01-27 20:24:32 +07:00
softsimon
6507b5e003
Adding hungarian language. 2021-01-24 04:19:50 +07:00
wiz
0336c6256a
Don't create empty cache.json on startup anymore 2021-01-18 12:20:55 +09:00
wiz
a05af48059
Add missing production/mempool-frontend-config.json 2021-01-11 23:14:08 +09:00
wiz
3e2a49c08e
Update production/mempool-config.*.json files for new backend config 2021-01-11 17:42:35 +09:00
wiz
b261243f85
Rewrite server.ts to fix i18n and implement proper HTTP 404 responses 2020-12-23 13:26:11 +09:00
wiz
6491d4576a
Fixes after merging master into AU branch, add nginx.conf for SSR 2020-12-22 11:31:49 +09:00
wiz
0d50bbdc0a
Adjust build scripts for new AU frontend build output in /browser/ 2020-12-22 07:09:45 +09:00
wiz
a2740aaa02
Enable 'ka' locale for Georgian 2020-12-07 00:20:05 +09:00
wiz
73db9c5023
Enable 'ar' locale for Arabic 2020-12-04 04:11:14 +09:00
wiz
129f122993
Replace nginx.conf try_files for /$lang/index.html with rewrite (fixes #250) 2020-12-03 18:52:03 +09:00
wiz
83501cfdbe
Enable locale 'vi' for Vietnamese 2020-12-03 10:16:02 +09:00
wiz
2b2bc2fc41
Change nginx.conf Tor HS port from 81 to 80 to fix i18n bug 2020-12-03 09:56:29 +09:00
wiz
6b498b9601
Exempt localhost from nginx rate limits for Tor and AU usage 2020-12-03 09:47:39 +09:00
wiz
d3cb1d607b
Update list of supported locales 2020-12-02 21:33:53 +09:00
wiz
352afbc029
Add one more fix to nginx.conf for i18n 2020-12-02 21:21:44 +09:00
wiz
4658b47007
Implement i18n support in frontend using Angular + Transifex + NGINX
This PR adds basic i18n support into the mempool frontend, together with
a smooth workflow for developers and translators to collaborate:

* Using the existing @angular/localize module, developers add i18n
metadata to any frontend strings their new features or changes modify

* Using the new npm script `i18n-extract-from-source`, developers
extract the i18n data from source code into `src/locale/messages.xlf`

* After pushing the updated `src/locale/messages.xlf` to GitHub, the
Transifex service will update its database from the new source data

* Using the Transifex website UI, translators can work together to
translate all the mempool frontend strings into their native languages

* Using the new npm script `i18n-pull-from-transifex`, developers can
pull in completed translations from Transifex, and commit them into git.

This flow requires an API key from Transifex, which can be obtained at
https://www.transifex.com/user/settings/api/ to be used with the python
script installed by `pip install transifex-client` - after preparing
these, run the npm script which will ask you for the API key the first
time. When downloading is complete, you can test building the frontend,
and if successful, commit the new strings files into git.

This PR implements a new locale selector in the footer of the homepage
dashboard, and includes WIP translations for the following languages:

* Czech (cs)
* German (de)
* Japanese (ja)
* Norwegian (nn)
* Spanish (es)
* Swedish (sv)
* Ukrainian (uk)
* Persian (fa)
* Portugese (pt)
* Turkish (tr)
* Dutch (nl)
* French (fr)
* Chinese (zh)
* Slovenian (sl)
* Korean (ko)
* Polish (pl)

The user-agent's `Accept-Language` header is used to automatically
detect their preferred language, which can be manually overriden by the
pull-down selector, which saves their preference to a cookie, which is
used by nginx to serve the correct HTML bundle to the user.

Remaining tasks include adding i18n metadata for strings in the Bisq and
Liquid frontend code, mouseover hover tooltip strings, hard-coded og
metadata inside HTML templates, and many other places. This will be done
in a separate PR.

When upgrading to add i18n support, mempool instance operators must take
care to install the new nginx.conf and nginx-mempool.conf files, and
tweak for their specific site configuration.

Fixes #81
2020-12-02 04:19:33 +09:00
wiz
827c5d12a3
Modify upgrade script to append repo before tag name 2020-11-23 09:46:50 +09:00
wiz
ab6ed227e3
Modify upgrade script to include "tag @ hash" in notification msg 2020-11-16 23:44:32 +09:00
wiz
ffb08e5e01
Fix nginx.conf reverse proxy cache URL path for sponsor images 2020-11-16 00:43:10 +09:00
wiz
b89a549a75
Enable nginx reverse proxy cache for sponsor profile images + misc tweaks 2020-11-06 14:09:04 +09:00
wiz
75ce300332
Don't call npm install with --only=prod 2020-10-26 04:24:05 +09:00
wiz
32095cd6b3
Don't rate limit /api/v1/donations URL prefix for sponsor photos 2020-10-19 20:56:46 +09:00
wiz
d8521a9e21
Update production backend configuration files for all 4 instances 2020-10-19 20:40:56 +09:00
wiz
4c82e292be
Fix typo in previous commit 2020-10-19 19:49:02 +09:00
wiz
eb00b92996
Modify upgrade script to allow reverting to a specific git hash or tag 2020-10-19 19:43:30 +09:00
wiz
2c3f425797
Route /api and /<network/api URLs to HTML for API documentation 2020-10-18 13:11:02 +09:00
wiz
3fd5277912
Update mempool-logger and syslog.conf to separate info and notice msgs 2020-10-13 19:58:11 +09:00
wiz
056fe5712d
Add newsyslog.conf to rotate mempool logfiles regularly 2020-10-13 19:56:10 +09:00
wiz
cbcfbe5b36
Add mempool-logger script and syslog.conf configuration to log to it 2020-10-13 19:16:09 +09:00
wiz
c48a151e21
Tweak upgrade script to take PR branch name as argument 2020-10-08 01:35:54 +09:00
wiz
e9d3b44e97
Set "LIQUID":true in production liquid backend config 2020-09-28 05:00:21 +09:00
wiz
aa3559e634
Add production script to update local copy of assets registry JSON 2020-09-24 18:42:13 +09:00
wiz
3aff874479
Update production nginx.conf and mempool-config.json for Bisq Markets API 2020-09-23 19:39:46 +09:00
wiz
fa75c1b08d
Move backend restart command from upgrade command into its own command 2020-09-23 19:05:28 +09:00
wiz
8146939f0f
Remove unnecessary options from production README's bitcoin.conf 2020-09-20 05:45:29 +09:00
wiz
630e3fa863
Update production scripts to only install production npm deps 2020-09-19 02:19:47 +09:00
wiz
55852bcf62
Update production bisq instance backend config for Bisq Markets data 2020-09-18 22:02:23 +09:00
wiz
91815072d5
Update production scripts to install/load NodeJS/npm using nvm 2020-09-18 21:53:58 +09:00
wiz
07cfdd73aa
Fix upgrade script not restarting node due to new command line args 2020-09-18 18:08:59 +09:00
wiz
c1c0521ab4
Merge pull request #107 from mempool/bisq-markets
Bisq markets API
2020-09-15 05:28:28 +09:00
softsimon
a11135f358
* /volumes API
* /ticker API
2020-09-15 03:11:52 +07:00
wiz
9234d23da2
Update production nginx.conf with performance tuning and rate limiting 2020-09-10 14:39:04 +09:00
wiz
d7a5ecc4aa
Add bisq websocket proxy in production nginx.conf 2020-07-26 00:03:30 +09:00
wiz
7f7c6ef6f8
Minor tweaks to production, use git pull --rebase, only build 1 frontend 2020-07-25 01:46:51 +09:00
wiz
6ded0f54c4
Add production 4th instance for bisq backend 2020-07-24 21:53:57 +09:00
wiz
067540980e
Add filesystem notes to production README doc 2020-07-24 21:53:55 +09:00
wiz
4e6ba18f19
Add proxy_pass with rewrite for /bisq/api into nginx.conf 2020-07-18 21:07:36 +09:00
wiz
4aca806b70
Rename API endpoints in frontend and nginx.conf to match blockstream 2020-07-06 00:15:16 +09:00
wiz
50ccdc424d
Add HTTP Link: header for canonical URL reference to mempool.space 2020-07-05 16:34:26 +09:00
wiz
926842d949
Fix HTTP content-security-policy header typo 2020-07-04 18:00:41 +09:00
wiz
ae4eb22db9
Add HTTP security headers to production nginx.conf 2020-07-04 17:57:26 +09:00
wiz
c9cc660e54
Update production upgrade script to update main repo, announce hostname 2020-06-21 01:53:24 +09:00
wiz
0609ce91d0
Update production README dependency packages for FreeBSD 2020-06-21 01:53:07 +09:00
wiz
ca9ee0e6ae
Add torrc in production README 2020-05-26 23:13:57 +09:00
wiz
b9d9875e98
Remove duplicate npm install and build steps in production scripts 2020-05-26 21:52:50 +09:00
wiz
9af0015c22
Remove uacomment from bitcoin.conf 2020-05-26 21:34:47 +09:00
wiz
c732f2d423
Always run "npm install" when upgrading, only build mainnet frontend 2020-05-26 21:34:45 +09:00
wiz
4ece586709
Add missing MySQL grant statements in production README 2020-05-26 13:23:57 +09:00
wiz
01ac06b096
Fix start/upgrade scripts to properly restart the backend processes 2020-05-26 13:23:55 +09:00
wiz
ecbc3e7580
Add production site setup guide and related install scripts 2020-05-25 20:58:46 +09:00
wiz
003361befb
Update misc files used for mempool.space production website 2020-05-25 18:42:00 +09:00