mobilizon.chapril.org-mobil.../docker/production
Thomas Citharel 005470ba5b Introduce the mobilizon_ctl wrapper to easily call tasks inside releases
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2020-10-31 02:42:06 +01:00
..
Dockerfile Introduce the mobilizon_ctl wrapper to easily call tasks inside releases 2020-10-31 02:42:06 +01:00
README.md Fix MR649 threads about env.template, pg port 2020-10-31 02:42:06 +01:00
docker-compose.yml Introduce the mobilizon_ctl wrapper to easily call tasks inside releases 2020-10-31 02:42:06 +01:00
docker-entrypoint.sh Introduce the mobilizon_ctl wrapper to easily call tasks inside releases 2020-10-31 02:42:06 +01:00
env.template Fix MOBILIZON_INSTANCE_HOST in env.template 2020-10-31 02:42:06 +01:00
releases.exs Make sure only "true" value is accepted to enable registrations 2020-10-31 02:42:06 +01:00

README.md

Build and deploy Mobilizon with docker

You will need to :

  • build the image
  • tune the environment file
  • use docker-compose to run the service

Build the image

git clone https://forge.tedomum.net/tedomum/mobilizon
cd mobilizon
docker build -t mobilizon -f docker/production/Dockerfile .

Update the env file

cd docker/production/
cp env.template .env

Edit the .env content with your own settings. More settings can be added in .env, see all in docker-compose.yml file.

You can generate MOBILIZON_INSTANCE_SECRET_KEY_BASE and MOBILIZON_INSTANCE_SECRET_KEY with:

gpg --gen-random --armor 1 50

Run the service

Start by initializing and running the database:

docker-compose up -d db

Instanciate required Postgres extensions:

docker-compose exec db psql -U <username>
# CREATE EXTENSION pg_trgm;
# CREATE EXTENSION unaccent;

Then run migrations:

docker-compose run --rm mobilizon eval Mobilizon.CLI.migrate

Finally, run the application:

docker-compose up -d mobilizon

Update the service

Pull the latest image, then run the migrations:

docker-compose pull mobilizon
docker-compose run --rm mobilizon eval Mobilizon.CLI.migrate

Finally, update the service:

docker-compose up -d mobilizon