Skip to content

Commit

Permalink
Reestruturação do visual, pastas, docker dev e prod completos
Browse files Browse the repository at this point in the history
  • Loading branch information
Ronneesley committed Sep 14, 2023
1 parent 6bf4159 commit 99658f5
Show file tree
Hide file tree
Showing 71 changed files with 567 additions and 1,425 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
# Statistical Lab (SLab)

![Sistema de perguntas e respostas](screenshots/quiz.png)
![Sistema de perguntas e respostas](documentacao/screenshots/quiz.png)

![Painel administrativo](screenshots/admin.png)
![Painel administrativo](documentacao/screenshots/admin.png)

## Como rodar o ambiente para desenvolvimento?

Entre dentro da pasta `bin` e emita o comando:
Entre dentro da pasta `bin` e emita o comando.

**ATENÇÃO**: este comando acima deve ser executado com o seu usuário normal (**não root**).

```console
sudo ./configurar_ambiente_dev.sh
./configurar_ambiente_dev.sh
```

Em seguida execute o comando:
Expand Down
13 changes: 11 additions & 2 deletions bin/configurar_ambiente_dev.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
#!/bin/bash

source 'utilitarios.sh'

#Entra dentro da pasta php e instala as dependências do npm e do composer
cd ../php/src

npm install
verificar_operacao

composer install
verificar_operacao

#Cria e dá permissão no diretório temporário
mkdir tmp
if [ ! -d tmp ]; then
mkdir tmp
fi
chmod -R 777 tmp
rm -rf tmp/* #Limpa possíveis arquivos sem permissão

#Dá permissão no arquivo de configuração do banco de dados
chmod 777 configuracoes.json
chmod 777 configuracoes.json
2 changes: 1 addition & 1 deletion bin/instalar_ferramenta.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ case $1 in
instalar_via_apt apache2
;;
configurar_php)
if [ -d ~/www ]; then
if [ ! -d ~/www ]; then
mkdir ~/www
fi

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
3 changes: 3 additions & 0 deletions php/Dockerfile-prod
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ FROM php:8.1-apache
#Copia os arquivos do projeto para a pasta pública
COPY src/ /var/www/html/

#Remove a pasta vendor e node_modules se elas existirem
RUN rm -rf /var/www/html/vendor && rm -rf /var/www/html/node_modules/ && rm -rf /var/www/html/tmp

#Configura a pasta de dependências em PHP
RUN mkdir /var/www/html/vendor
COPY --from=bcomposer /var/www/html/vendor/ /var/www/html/vendor/
Expand Down
179 changes: 0 additions & 179 deletions php/dbc/dbc.php

This file was deleted.

21 changes: 0 additions & 21 deletions php/dbc/index.html

This file was deleted.

1 change: 0 additions & 1 deletion php/dbc/material_referencia.txt

This file was deleted.

61 changes: 0 additions & 61 deletions php/dbc/montagem_quadro.php

This file was deleted.

Binary file removed php/dbc/roteiro_resumo.odt
Binary file not shown.
13 changes: 0 additions & 13 deletions php/dic/material_referencia.txt

This file was deleted.

Binary file removed php/dic/roteiro_resumo.odt
Binary file not shown.
6 changes: 3 additions & 3 deletions php/src/configuracoes.json
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"usuario": "slab",
"senha": "slab123",
"banco_dados": "slab",
"porta": 3306
}

"porta": 3306,
"modo_instalacao": true
}
Loading

0 comments on commit 99658f5

Please sign in to comment.