Skip to content

fchampalimaud/congento

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CONGENTO

Docker: configurations available

Compose file Usage
docker-compose.yml Launch a development server
docker-compose.staging.yml Launch a staging server
docker-compose.production.yml Launch a production server

Development

Clone this repository and sync its submodules.

git clone [email protected]:fchampalimaud/congento.git
cd congento
git pull --recurse-submodules
git submodule update --init --recursive

Configure the development environment from the example provided

cp .env.example .env

Build the image and launch it. To create an admin user or run any command inside the container, see the examples below.

docker-compose build
docker-compose up
docker-compose exec django pipenv run python manage.py createsuperuser
Service Address
Django http://localhost:8000
MailHog http://localhost:8025

Deployment

Clone this repository into the production machine and synchronize the submodules.

git clone --branch master --single-branch https://github.com/fchampalimaud/congento.git
cd congento
perl -i -p -e 's|git@(.*?):|https://\1/|g' .gitmodules

Note: the perl script is required to change submodules URLs to https:// schema.

Pull the latest modifications and update the submodules.

git pull --recurse-submodules
git submodule update --init --recursive

Configure environment variables in .env

cp .env.example .env

Launch the containers

docker-compose -f docker-compose.production.yml up --build -d

and create a superuser

docker-compose -f docker-compose.production.yml exec django pipenv run python manage.py createsuperuser

Log in to the /admin panel and configure

  • Admin account and email
  • Sites framework
  • Social Apps

Updates

Backup the database before proceeding!

Restarting the container should be enough to collect static files and migrate the database.

git pull
git submodule update --init --recursive
docker-compose -f docker-compose.production.yml restart

Remeber to update .env file if needed.

Creating database dumps

docker-compose exec mysql sh -c 'export MYSQL_PWD="$MYSQL_ROOT_PASSWORD"; exec mysqldump --all-databases -uroot' > /some/path/on/your/host/all-databases.sql

Restoring data from dump files

docker-compose exec -T mysql sh -c 'export MYSQL_PWD="$MYSQL_ROOT_PASSWORD"; exec mysql -uroot' < /some/path/on/your/host/all-databases.sql

About

CONGENTO members shared database.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published