Commit Graph

42 Commits (060df6c5c9046f91d9c1b982e7ba59078d3f14de)

Author SHA1 Message Date
Shlee 2d2f2f08cf Update Elasticsearch from 6.1 to 6.8 in docker-compose.yml (Fix glitch-soc#1348) (#14016)
* Update docker-compose.yml

* Update docker-compose.yml

* Update docker-compose.yml

* Update docker-compose.yml

* Update docker-compose.yml
2020-06-10 13:57:30 +02:00
Shlee f94a21ce5d Update docker-compose.yml (#13756) 2020-05-15 11:38:30 +02:00
Matej Ľach 78a70bac7b increase the postgres container shm_size from 64mb to 256mb (#13451) 2020-04-12 16:41:54 +02:00
Yamagishi Kazutoshi 7544167f3c Add healthcheck endpoint for web (#11770) 2019-09-07 02:47:51 +02:00
Eugen Rochko 02cf7a07ae Change Dockerfile to bind to 0.0.0.0 instead of docker-compose.yml (#11351) 2019-07-18 20:28:05 +02:00
Eugen Rochko fe299d3417 Change default interface of web and streaming from 0.0.0.0 to 127.0.0.1 (#11302) 2019-07-15 05:56:35 +02:00
Shlee decaffc020 Upgrade redis in docker-compose.yml from 4 to 5 (#9063) 2019-05-19 11:29:26 +02:00
Fabian Schlenz 2d6fd9197b Fixed Healthchecks in docker-compose.yml (#10553) 2019-04-23 00:54:26 +02:00
Sir-Boops 60b0585743 Remove uneeded command and switch to images for TOR (#9438) 2019-01-04 16:15:09 +01:00
Ben Lubar 02a84db787 Add healthcheck commands to docker-compose.yml (#9143)
This will allow Docker to be automatically check the health of services.

Docker won't do anything other than showing the state in the output of
"docker-compose ps" by default, but some management tools may watch for
container health events.

Here's what my local instance looks like right now:

          Name                        Command                  State                     Ports
-------------------------------------------------------------------------------------------------------------
mastodon_db_1              docker-entrypoint.sh postgres    Up (healthy)
mastodon_es_1              /usr/local/bin/docker-entr ...   Up (healthy)
mastodon_redis_1           docker-entrypoint.sh redis ...   Up (healthy)
mastodon_redis_cache_1     docker-entrypoint.sh redis ...   Up (healthy)
mastodon_sidekiq_1         /sbin/tini -- bundle exec  ...   Up             3000/tcp, 4000/tcp
mastodon_streaming_1       /sbin/tini -- yarn start         Up (healthy)   3000/tcp, 127.0.0.1:4000->4000/tcp
mastodon_web_1             /sbin/tini -- bash -c rm - ...   Up (healthy)   127.0.0.1:3000->3000/tcp, 4000/tcp
2018-12-29 00:43:41 +01:00
Eugen Rochko 4b8c72a3fb Persist volumes by default in docker-compose (#9055)
Too many databases were lost to this
2018-10-23 00:08:25 +02:00
luzpaz 1bce70d3c7 Misc. typos (#8694)
Found via `codespell -q 3 --skip="./app/javascript/mastodon/locales,./config/locales"`
2018-09-14 00:53:09 +02:00
ThibG 56caf50db7 Update docker config and move some workers to different queues (#8345)
* Reorder docker-compose's sidekiq queues to match config/sidekiq.yml

* Make the ̀“mailers” queue higher priority than “pull”
2018-09-02 16:13:06 +02:00
Aaron Brady 98577df03a Update docker-compose to cope with build-time assets (#8156)
#7780 means that asset compilation happens as a build step.

Having the assets and packs volumes defined in `docker-compose.yml` breaks this. For people who run under Docker Compose, I believe this will fix their CSS (which even running the asset recompilation separately did not).
2018-08-09 22:37:48 +02:00
MIYAGI Hikaru ac56fa3c22 Merge `HIDDEN_SERVICE_VIA_TRANSPARENT_PROXY` into `ALLOW_ACCESS_TO_HIDDEN_SERVICE` (#7901)
If Mastodon accesses to the hidden service via transparent proxy, it's needed to avoid checking whether it's a private address, since `.onion` is resolved to a private address.
I was previously using the `HIDDEN_SERVICE_VIA_TRANSPARENT_PROXY` to provide that function. However, I realized that using `HIDDEN_SERVICE_VIA_TRANSPARENT_PROXY` is redundant, since this specification is always used with `ALLOW_ACCESS_TO_HIDDEN_SERVICE`. Therefore, I decided to integrate the setting of `HIDDEN_SERVICE_VIA_TRANSPARENT_PROXY` into` ALLOW_ACCESS_TO_HIDDEN_SERVICE`.
2018-06-29 15:36:02 +02:00
J Yeary 9bd6bf2340 TOR federation (#7875) 2018-06-26 20:34:12 +02:00
Isatis a1db299d79 Remove Puma pidfile before boot if container receives SIGTERM (#7052) 2018-05-25 18:50:31 +02:00
Valentin Lorentz b780ef9506 docker-compose: Only bind ports 3000 and 4000 on localhost. (#7138) 2018-04-15 13:57:58 +02:00
Eugen Rochko a13ae467f9 Separate chown command in Dockerfile. Use tootsuite/mastodon image (#6662)
Fix #6605
2018-03-07 01:57:31 +01:00
Akihiko Odaki c717f76652 Do not use npm (#6656)
Both of yarn and npm are used in Mastodon, but the combined usage requires
a redundant dependency and may lead to data inconsistency.

Considering that yarn has autoclean feature which npm does not have,
this change replaces all npm usage with yarn.

This change requires documentation update. Most notably, the following
command must be executed before assets precompilation if any system
dependency of node-sass has changed:

yarn install --force --pure-lockfile
2018-03-06 21:36:46 +01:00
Eugen Rochko 7ca5a06505 Full-text search for authorized statuses (#6423)
* Add full-text search for authorized statuses

- Search API will return statuses that match the query
- Only for logged in users
- Only if you are author of the status,
- Or you were mentioned in it
- Or you favourited or reblogged it
- Configuration over `ES_ENABLED`, `ES_HOST`, `ES_PORT`, `ES_PREFIX`
- Run `rails chewy:deploy` to create & populate index

Fix #5880
Fix #4293
Fix #1152

* Add commented out docker-compose configuration for ES container

* Optimize index import, filter search results

* Add basic normalization to the index

* Add better stemming and normalization to the index

* Skip webfinger request if search query includes both @ and a space

* Fix code style

* Visually separate search result sections

* Fix code style issues
2018-02-09 23:04:47 +01:00
Akihiko Odaki ded217f84a Isolate internal services from external networks in Docker configuration (#6369)
The database and Redis do not need external connections, so isolate them
and prevent unauthorized access.
2018-02-03 18:44:22 +01:00
Yamagishi Kazutoshi b190de470a Add packs volume to docker-compose.yml (#6348) 2018-01-24 13:29:32 +01:00
unarist 856863fe2f Specify middleware versions in docker-compose.yml (#5247)
PostgreSQL10 has been released, but upgrading from older versions needs dump/restore. If you pull new version without those handling, db service will fail to launch.

To prevent accidentally upgrading, and as a recommended version, this patch specifies PostgreSQL and Redis version.
2017-10-06 20:37:17 +02:00
Valentin Ouvrard 1f0c830c97 Switch docker-compose to version 3. (#2747)
* Switch docker-compose to version 3.

It allow possibility to Deploy Mastodon in a Swarm cluster directly from the compose file.

* switch to compose v3 without depend.
2017-05-04 15:56:05 +02:00
Eugen Rochko ef2af79a48 Replace sprockets/browserify with Webpack (#2617)
* Replace browserify with webpack

* Add react-intl-translations-manager

* Do not minify in development, add offline-plugin for ServiceWorker background cache updates

* Adjust tests and dependencies

* Fix production deployments

* Fix tests

* More optimizations

* Improve travis cache for npm stuff

* Re-run travis

* Add back support for custom.scss as before

* Remove offline-plugin and babili

* Fix issue with Immutable.List().unshift(...values) not working as expected

* Make travis load schema instead of running all migrations in sequence

* Fix missing React import in WarningContainer. Optimize rendering performance by using ImmutablePureComponent instead of
React.PureComponent. ImmutablePureComponent uses Immutable.is() to compare props. Replace dynamic callback bindings in
<UI />

* Add react definitions to places that use JSX

* Add Procfile.dev for running rails, webpack and streaming API at the same time
2017-05-03 02:04:16 +02:00
Pierre Ozoux 823f220f2b Use image too in docker-compose (#1109)
* Use image too in docker-compose

It is possible with version 2 of compose to use both `build` and `image`

* Update docker-compose.yml
2017-04-15 02:07:59 +02:00
Valentin Ouvrard 891e67669e Add (commented) volume in docker-compose && Mitigating the HTTPoxy Vulnerability (#1253)
* enable commented volume in docker-compose.yml

* Disable unworking Nginx root directory && Mitigating the HTTPoxy Vulnerability

* add my instance to the list

* enable GZIP on nginx.conf

* readd root /home/mastodon/live/public;
2017-04-11 16:04:56 +02:00
Eugen dfb355c53e Revert "add persistance to Postresql container" (#1251) 2017-04-08 12:25:23 +02:00
Valentin_NC 39f478ec1d add volume for redis container 2017-04-05 14:13:22 +11:00
Valentin_NC e9b2c26a20 add persistance to Postresql container 2017-04-05 09:06:08 +11:00
Eugen Rochko 8eca42b265 Separate background jobs into different queues. ATTENTION: new queue "pull"
must be added to the Sidekiq invokation in your systemd file

The pull queue will handle link crawling, thread resolving, and OStatus
processing. Such tasks are more likely to hang for a longer time (due to
network requests) so it is more sensible to not make the "in-house" tasks
wait for them.
2017-04-04 00:53:20 +02:00
Wonderfall b11e1f73c9 use alpine-based official images 2017-04-03 03:09:56 +02:00
Eugen Rochko 9bd2b6be86 Make the streaming API also handle websockets (because trying to get the browser EventSource interface to
work flawlessly was a nightmare). WARNING: This commit makes the web UI connect to the streaming API instead
of ActionCable like before. This means that if you are upgrading, you should set that up beforehand.
2017-02-04 00:34:31 +01:00
Eugen Rochko 3c1c2b0e06 Adding rack timeout of 30sec, PuSH jobs moved to push queue so they
can be processed separately
2016-11-29 02:07:14 +01:00
Eugen Rochko 30f9e9e624 Remove Neo4J 2016-11-24 23:46:27 +01:00
Eugen Rochko bd362f8b39 Add restart policy to docker compose 2016-10-25 13:21:48 +02:00
Eugen Rochko db09f7250d Add custom neo4j dockerfile with graphaware and noderank plugins 2016-10-15 16:13:16 +02:00
Eugen Rochko e88d667d3f Add sync command for neo4j, fix configuration, add neo4j to docker-compose, fix seed 2016-10-15 12:37:43 +02:00
Eugen Rochko 42dcb0d4cb Adding Sidekiq for background processing (firstly just of mailers) 2016-03-25 02:50:48 +01:00
Eugen Rochko 48d66a2055 Fixing the docker container setup (with assets compilation &co) 2016-03-16 12:57:01 +01:00
Eugen Rochko b17202ca0f Adding a docker-compose template for running Mastodon easily 2016-03-14 21:39:39 +01:00