Skip to content
Snippets Groups Projects
Select Git revision
  • 5d04dbd6e093589f921e42c9ca1b92853fc05a5f
  • master default protected
  • doli-script-update
  • add-info-cli
  • improve_doli_logs
  • nullmailer
  • 79-expedition-de-mails-depuis-nos-instances-dolibarr
  • 4-mettre-a-jour-le-fichier-env-sample
  • sso
  • donation-form
  • 7-agenda
11 results

dolibarr

  • Clone with SSH
  • Clone with HTTPS
  • Setting up your environement

    1. git clone https://gitlab.tetras-libre.fr/nocloud/docker/dolibarr

    2. Copy appropriate .env (Dev or prod).

    • cp .env.dev.sample .env
    • cp .env.prod.sample .env
    1. In edit .env (DB password and HOST at least for production)
    2. If required change DOLI_VERSION in .env file, see https://github.com/Dolibarr/dolibarr/tags
    3. docker-compose up, the first docker-compose up takes time because we have git clone. You need to wait the end of git clone
    4. This will create 2 directories dolibarr_src : dolibarr code source and logs and dolibarr_db: mysql files
    5. Create a link to the dolibarr custom directory (where you should put your modules):
    • ln -s dolibarr_src/htdocs/custom/ src
    1. Give the permissions for dolibarr to write the dolibarr_src directory, these rights will be fixed later by ./doli perms
    ./doli bash
    chmod -R g+w dolibarr
    chown -R :www-data dolibarr
    1. Configuration of dolibarr with web interface (see below for database configuration)

    2. Fix permissions ./doli perms

    3. Go to http://localhost:8080/ or your production instance and start configuration

    config.png

    Setup following fields :

    • Serveur de base de données : in dev mariadb
    • Identifiant dolibarr
    • Mot de passe : Password from PASS variable in your .env
    1. Go to Configuration > Email and configure the mail server
    2. Go to Configuration > Societe / Organisation and configure the organisation

    Config Fail2Ban

    1. login in administrator "config" > "moduls/application"
    2. Activate log modules
    3. Set log level on "LOG_NOTICE (6)"
    4. Switch in root user
    5. ./doli fail2ban
    6. Enter name of instance interactivly
    7. systemctl restart fail2ban

    Databases (For developpement)

    There is a dumps/ directory in this repository holding a very old dump from a dev instance of Dolibarr 9.x

    admin password on this instance is dev

    There is a dump from a database used for internal developpements. You can import it by running:

    docker exec -i $(docker-compose ps -q mariadb) mysql -uroot -p'password-from.env' < dump.sql

    You must set your mysql password to 7rU2//B7XEe[UrnPs6bPOWu[c]#}I>K- after importing this dump

    Troubleshooting

    Cannot write my source files or cannot run git command on src/

    The docker container reset the ownership of src/ to www-data (id 33), so you should run sudo chown -R $(whoami):33 src/ to regain access