Git Product home page Git Product logo

citelibre / rendezvous Goto Github PK

View Code? Open in Web Editor NEW
5.0 5.0 2.0 10.67 MB

This repository hosts all source code required to launch a full-featured local CiteLibre RendezVous application

Home Page: https://lutece.paris.fr/fr/jsp/site/Portal.jsp?page_id=22

License: BSD 2-Clause "Simplified" License

Makefile 0.08% Dockerfile 0.15% Shell 0.35% HTML 0.12% CSS 4.00% JavaScript 91.19% PHP 0.19% C 0.21% Roff 1.94% FreeMarker 1.77%
lutece rendez-vous citelibre agenda agenda-management

rendezvous's Introduction

CitéLibre logo

CitéLibre RendezVous with docker-compose

Architecture

Architecture with embedded database and stmp server

CiteLibre architecture diagram

Environment variables

Copy the external.env file as .env in the root directory. There you should assign values for environment variables containing sensitive data, such as external database connection information.

These variables should be manually set.

Here is a list of variables (key) that need to be set in the .env file (key with = as separator):

  • LUTECE_DB_USER : Set the user for the database connection
  • LUTECE_DB_PWD : Set the password for the database connection
  • LUTECE_DB_NAME : Set db name (schema) where your lutece tables are created
  • LUTECE_DB_HOST : Set the mysql host where your database is hosted
  • LUTECE_DB_PORT : Set the mysql port (if no set use by default 3306)
  • LUTECE_MAIL_HOST : Set the SMTP host
  • LUTECE_MAIL_PORT : Set the SMTP port
  • LUTECE_MAIL_USER : Set user authentification if your SMTP proivder required an authent
  • LUTECE_MAIL_PWD : Set password authentification if your SMTP proivder required an authent
  • KEYCLOAK_USER : Set user admin for keycloak (default is admin)
  • KEYCLOAK_PASSWORD: Set admin password (default admin1234)
  • DB_VENDOR : db type for keycloak (default mysql)
  • DB_ADDR : db host (by default we use db container)
  • DB_DATABASE : database name for keycloak (default keycloak)
  • DB_USER: : database user for keycloak
  • DB_PASSWORD: : database password for keycloak

Getting started

If you are behind a proxy :

  1. Start the CiteLibre service (and any others) in background:
    docker-compose up -d

In interactive :

    docker-compose up

Startup takes 1 minute

If you have created an env file named external-database.env start the following

    docker-compose --env-file external-database.env up -d

If you create an .env file, docker compose use it without using --env-file

  1. Open UI at http://localhost:8080/rendezvous.

Back end is available at : http://localhost:8080/rendezvous/jsp/admin/AdminLogin.jsp

Defaut login is admin and password is adminadmin

  1. Open UI mail (in order to see mail send by application) at http://localhost:1080/.

  2. Open UI matomo (for see stats of your application) at http://localhost:80.

Defaut login is admin and password is adminadmin

Helpful commands

  • docker-compose exec citelibre /bin/bash: Get a bash shell inside your CiteLibre-rendezvous container.
  • docker-compose logs: See all logs.
  • docker-compose logs {service}: See logs for a particular service, e.g. citelibre.

Optional services

If these services are not relevant to you, feel free to delete the corresponding commented sections.

Persist your data (database and solr)

if you need to persist your data with an embedded database and solr you can use a local directory. In docker-compose.yml uncomment the volumes section

For sample for the following volumes :

        volumes:
            - ./mysql-data:/var/lib/mysql

Create the local directory mysql-data

   mkdir mysql-data

For solr uncomment

        volumes:
            - ./solr-data:/var/solr/data/cite-libre/data

Create the local directory solr-data

   mkdir solr-data

You can then launch docker compose

    docker-compose up -d

in the local directory mysql-data and solr-data you will see some files and directory being created.

Keycloack

By default keycloak use mysql for his database.

If you want to use an external keycloak or an another OpenID provider please modify oauth2_context.xml in citelibre-rendez/webapp/WEB-INF/conf/override/plugins (for change callbackurl, client id, client secret...) and in docker compose delete keycloak entry

You can access to keycloak via http://localhost:8081/ => admin / admin1234

For test openid connection launch the following url :

http://localhost:8080/rendezvous/jsp/site/Portal.jsp?page=oauth2

and click on oauth2 image.

Users can be created in keycloak backend => Manage / Client or for demo you can use user demo : [email protected] / test1234=TEST1234

Matomo

In matomo by default is displayed the day after today. Remember to change with the current date of the day if you want see the actual data

External database

If you want to use an external database (only support mariabd or mysql for the moment), create a database for lutece with the following command :

    CREATE DATABASE citelibre
    CREATE USER 'admincitelibre'@'%' IDENTIFIED BY 'motdepasse'; 
    GRANT ALL PRIVILEGES ON *.* TO 'admincitelibre'@'%';

Load dump (dump.sql) to populate data with the following command :

    USE citelibre;
	SOURCE dump.sql;

Important If the database is hosted on the same server, make sure you don't use localhost as it will use the container's localhost, instead use the IP address of the server.

To check that the database is accessible through the container network, open a terminal on the app container and type the following command ...

    Openssl s_client -connect <IP_or_host>:<PORT>

...the output should look like...

    CONNECTED(00000003)
    140278331168064:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:../ssl/record/ssl3_record.c:331:
    ---
    no peer certificate available
    ---
    No client certificate CA names sent
    ---
    SSL handshake has read 5 bytes and written 283 bytes
    Verification: OK
    ---
    New, (NONE), Cipher is (NONE)
    Secure Renegotiation IS NOT supported
    Compression: NONE
    Expansion: NONE
    No ALPN negotiated
    Early data was not sent
    Verify return code: 0 (ok)
    ---

... or it will look like

    140418660095296:error:0200206F:system library:connect:Connection refused:../crypto/bio/b_sock2.c:110:
    140418660095296:error:2008A067:BIO routines:BIO_connect:connect error:../crypto/bio/b_sock2.c:111:
    connect:errno=111

Create a database for matomo with the following command :

    CREATE DATABASE matomo
    CREATE USER 'adminmatomo'@'%' IDENTIFIED BY 'motdepasse'; 
    GRANT ALL PRIVILEGES ON *.* TO 'adminmatomo'@'%';

Production usage

DO NOT use this without persisting your data and email. You should use mounted volumes as containers can be recreated and re-init all data.

rendezvous's People

Contributors

citelibre avatar francoisericmerlin avatar hohll avatar sbelondr avatar swapon666 avatar yxme avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

timothee-hx yxme

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.