Sign inSign up

canardmouton/entrepot

By canardmouton

•Updated over 9 years ago

entrepot pour le SI

Image
0

4.1K

canardmouton/entrepot repository overview

⁠Application blanche java

⁠Contributors
  • mace_s
  • zheng_v (Nea)
  • ghirig_s (Sikred)
  • claebo_c
  • lasne_g
  • capes_h
  • lebrun_x
⁠Description

The goal of this project is to create a commun base for every java applications for USRI

⁠How to use

First you have to download docker with

sudo apt-get install docker.io

To use the project you have to install postgresql on your machine with the command

sudo apt-get install -y postgresql postgresql-contrib
sudo -u postgres bash -c "psql -c \"CREATE DATABASE entrepot;\""
sudo -u postgres bash -c "psql -c \"CREATE USER dev WITH PASSWORD 'root';\""
sudo -u postgres bash -c "psql -c \"grant all privileges on database entrepot to dev;\""
psql entrepot -f SQL\ script/init.sql

Do not forget to add privileges to the user

CREATE USER readonly  WITH ENCRYPTED PASSWORD 'readonly';
GRANT USAGE ON SCHEMA public to readonly;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO readonly;

-- repeat code below for each database:

GRANT CONNECT ON DATABASE foo to readonly;
\c foo
GRANT USAGE ON SCHEMA public to readonly; 
GRANT SELECT ON ALL SEQUENCES IN SCHEMA public TO readonly;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO readonly;

ALTER ROLE flux WITH Superuser;

To communicate with the database outside of the docker you need to modify two files. The first one is "pg_hba.conf". You have to add

# IPv4 local connections:
host    all             all             0.0.0.0/0               md5

The second file is "postgresql.conf"

listen_addresses = '*'		# what IP address(es) to listen on;

Then you have to build the docker with the command

chmod +x test.sh
./test.sh

Also you have to pull the docker image of the socletech and run it on your machine

sudo docker pull canardmouton/socletech
sudo docker run -it -p 8000:8080 canardmouton/socletech

Tag summary

Content type

Image

Digest

Size

617.6 MB

Last updated

over 9 years ago

docker pull canardmouton/entrepot