Online registration system for managing meeting participants and for printing badges or reports.
- Install
Docker <https://docker.com>
_ - Install
Docker Compose <https://docs.docker.com/compose>
_
-
Clone the repo::
git clone https://github.com/eaudeweb/meetings-registration-tool.git cd meetings-registration-tool
-
Create configuration files::
cp settings.example settings.py cp docker/postgres.env.example docker/postgres.env cp docker/init.sql.example docker/init.sql cp docker/log.env.example docker/log.env cp docker/app.env.example docker/app.env
-
Edit all the above files
-
Create
-
Spin up the docker containers::
docker-compose up -d docker-compose ps
-
Upgrade repo::
cd meetings-registration-tool git pull
-
Get the latest docker images and restart the docker containers::
docker-compose pull docker-compose up -d docker-compose ps
For production logging:
-
Update log.env with your Papertrail host and port destination values (https://papertrailapp.com/account/destinations):
vim docker/log.env
For accurate remote_addr values, please insert the correct header in VHOST file. See https://stackoverflow.com/questions/45260132/docker-get-users-real-ip for example.
-
Error logging is made with Sentry.io. Get client key from https://sentry.io/[organisation]/[project]/settings/keys/ and set the value of SENTRY_DSN from settings.py file::
SENTRY_DSN='https://xxx@sentry.io/232313'
Restart the application and run http://app-url/crashme to test the integration.
To backup the application run the following commands:
docker exec mrt.db pg_dump -Upostgres <db_name> -Cc | gzip > db.sql.gz
docker exec mrt.app tar cvf - /var/local/meetings/instance/files/ | gzip > files.gz
-Cc is equivalent to --create --clean.
--create tells pg_dump to include tables, views, and functions in the backup, not just the data contained in the tables.
--clean tells pg_dump to start the SQL script by dropping the data that is currently in the database. This makes it easier to restore in one step.
If you are using rsync.net or other incremental backup system, don't forget to add --rsyncable
to gzip command.
- Database
Copy the Postgres SQL dump file inside the postgres container, drop the current database and use psql to import the backup (you will find the POSTGRES_DBUSER and the POSTGRES_PASSWORD in the system environment variables)::
$ docker cp backup.sql mrt.db:/tmp/backup.sql
$ docker exec -it mrt.db bash
/# dropdb cms_meetings;
/# createdb cms_meetings;
/# psql < /tmp/backup.sql
- Files
Copy the files directory to the mrt.app container, under the instance directory:
$ sudo docker cp ./files mrt.app:/var/local/meetings/instance/
$ sudo docker exec -ti mrt.app bash
# chown root:root /var/local/meetings/instance/files