git clone https://github.com/linea-it/dri.git dri_temp \
&& cp -r dri_temp/compose/production/ scienceserver \
&& rm -rf dri_temp \
&& cd scienceserver/ \
&& mkdir -p data data/tmp log certificates \
&& mv env_template .env \
Generate SAML2 Certificates
cd certificates \
&& openssl genrsa -out mykey.key 2048 \
&& openssl req -new -key mykey.key -out mycert.csr \
&& openssl x509 -req -days 365 -in mycert.csr -signkey mykey.key -out mycert.crt \
&& cp mykey.key mykey.pem \
&& cp mycert.crt mycert.pem \
&& cd ..
Editar o arquivo .env com as variaveis de acesso ao banco de dados, Secrets, usernames e passwords
docker compose up backend
CRTL+C
Iniciar todos os serviços.
docker compose up -d
With the backend running, open another terminal and run the command create super user
docker compose exec backend python manage.py createsuperuser
This command will populate the database with
- DR2 public release data (list of images and datasets)
- Some example target lists (associated with user id 1)
docker compose exec backend python manage.py loaddata initial_data.json
Rodar o comando para gerar uma secret, copiar e alterar no local_vars.py a variavel SECRET_KEY.
docker compose exec backend python -c "import secrets; print(secrets.token_urlsafe())"
Após editar o arquivo .env com a Secret, é necessário reinicar os serviços.
docker compose stop && docker compose up -d
Neste ponto a instalação está concluida.
Para a autenticação com SATOSA funcionar é necessário estabelecera relação de confiança entre as aplicações.
docker compose up -d
or
docker compose stop && docker compose up -d
Returns the ID of a container by filtering by name
docker ps -q -f name=backend
Access the terminal in the backend container.
docker compose exec backend bash
List of commands available in Django
docker compose exec backend python manage.py --help
Nginx Reload
docker exec -it $(docker ps -q -f name=nginx) nginx -s reload
Build Manual das imagens docker
cd api && docker build -t linea/dri:backend_$(git describe --always) .
cd frontend && docker build -t linea/dri:frontend_$(git describe --always) .