-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial documentation, Dockerfile cleanup, backup, restore, version s…
…cripts
- Loading branch information
Showing
8 changed files
with
134 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
# Docker-compose image for diacamma | ||
|
||
this documentation mainly come from https://github.com/mgodlewski/dockerfiles/blob/master/diacamma/ | ||
|
||
http://www.diacamma.org/ | ||
|
||
## Building | ||
|
||
to run Diacamma application, you need to | ||
|
||
- install Docker and Docker-compose >= 1.25 | ||
- dowload this repository | ||
- build application localy | ||
- modify configuration | ||
- then run application | ||
|
||
``` | ||
# download application code (docker-compose) | ||
git cone https://github.com/mqu/docker-diacamma.git diacamma | ||
cd diacamma | ||
# build application localy in a docker container | ||
docker-compose build | ||
# edit docker-compose.yml variables | ||
# then run application | ||
docker-compose up -d | ||
# open http://localhost:8100/ | ||
# on first run, you can choose any login/password ; that will create a new account for adminstrator | ||
``` | ||
|
||
## Environment variables | ||
Here are environment possible values | ||
|
||
| var | possible values | default | description | | ||
|:------------------------|:------------------------------|:------------------------|:---------------------------------------------------| | ||
| DIACAMMA_TYPE | syndic, asso | asso | run a diacamma-syndic or diacamma-asso instance | | ||
| DIACAMMA_ORGANISATION | any string (no space allowed) | N/A | name for your Diacamma instance | | ||
| DIACAMMA_DATABASE | Refer to Database Section | SQLite used if empty | connection string to the database used by DIACAMMA; Only SQLite has be tested. | | ||
| GUNICORN_EXTRA_CMD_ARGS | See [gunicorn settings](https://docs.gunicorn.org/en/stable/settings.html) | | add extra arguments to gunicorn | | ||
|
||
## Data volumes exposed | ||
| path in containers | role | | ||
|:----------------------------------|:-------------------------------------| | ||
| /backups | store backups and restorations files | | ||
| /var/lucterios2/<organisation> | store organisation setup files | | ||
|
||
It's strongly recommended to map those path onto your host. | ||
|
||
## Building with sticked version | ||
|
||
You can build an image with forced version of each component. | ||
|
||
| Component | default constaint | package | | ||
|:-------------------|:------------------|:-----------------------------------------------------| | ||
| diacamma-asso | empty (latest) | https://pypi.org/project/diacamma-asso/#history | | ||
| diacamma-syndic | empty (latest) | https://pypi.org/project/diacamma-syndic/#history | | ||
| lucterios-standard | empty (latest) | https://pypi.org/project/lucterios-standard/#history | | ||
|
||
Constraint have to be compatible with pip install syntax (refer to https://www.python.org/dev/peps/pep-0440/#version-specifiers for more infos) | ||
|
||
|
||
|
||
## Databases | ||
|
||
- only SQLite database is supported and tested now | ||
- building docker with mysql client fails | ||
- don't know how to include postgresql | ||
|
||
## Backup and restore | ||
|
||
Your diacamma instance must be running. Let's suppose that your container is named `diacamma` as in examples above. | ||
|
||
```bash | ||
docker exec diacamma backup | ||
``` | ||
This will drop the backup file into your backups volume: `./backups/backup_20180901_20_26_55.lbkf` | ||
|
||
In order to restore a backup file just run this command: | ||
|
||
```bash | ||
docker exec diacamma restore backup_20180901_20_26_55.lbkf | ||
``` | ||
|
||
## FIXME | ||
|
||
- support : open an issue here: https://github.com/mqu/docker-diacamma/issues | ||
|
||
## TODO | ||
|
||
- not having many time to support this application on docker. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/env bash | ||
|
||
/bin/bash /entrypoint.d/entrypoint.sh backup $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/env bash | ||
|
||
/bin/bash /entrypoint.d/entrypoint.sh restore $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/env bash | ||
|
||
/bin/bash /entrypoint.d/entrypoint.sh version $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash -xv | ||
|
||
export LUCTERIOS_INSTALL="21112418" | ||
|
||
. $LUCTERIOS_PATH/virtual_for_lucterios/bin/activate | ||
cd $LUCTERIOS_PATH/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
quelques infos utiles pour non spécialiste de python, ... | ||
|
||
# Python | ||
|
||
liste et version des packets python installés en lien avec l'application Diacamma | ||
|
||
``` | ||
root@e0df2422b393:/var/lucterios2# pip list | egrep 'lucterios|diacamma' | ||
diacamma-asso 2.6.5.21122115 | ||
diacamma-financial 2.6.5.21122915 | ||
diacamma-syndic 2.6.5.21122320 | ||
lucterios 2.6.5.21122109 | ||
lucterios-contacts 2.6.2.21102510 | ||
lucterios-documents 2.6.1.21122009 | ||
lucterios-standard 2.6.0.21071209 | ||
``` | ||
|