This project is about developing a web interface for management of COVID-19 private declarations on the customs points.
OTHER License
This project is about developing a web interface for management of COVID-19 private declarations.
Project stack
Before start install, user will need:
sudo
privileges.git clone [email protected]:tudor-rusu/covid-19-dsp-dashboard.git covid-19-entry-dsp
covid-19-entry-dsp
directorycd ~/covid-19-entry-dsp
docker run --rm -v $(pwd):/app composer install
sudo chown -R $USER:$USER ~/covid-19-entry-dsp
.env.example
file that Laravel includes by default and name the copy .env
cp .env.example .env
nano .env
APP_NAME="DSP Declaraţii Coronavirus COVID-19"
APP_LOCALE=ro
DB_HOST=covid19-dsp-db
DB_DATABASE=laravel
DB_USERNAME=laravel
DB_PASSWORD=laravel
DB_ROOT_PASSWORD=toor
MAIL_MAILER=smtp
MAIL_HOST=0.0.0.0
MAIL_PORT=1025
MAIL_FROM_ADDRESS="[email protected]"
COVID19_DSP_API="<url_provided_provided_by_api_maintainer>"
COVID19_DSP_API_KEY="<key_provided_by_api_maintainer>"
CACHE_DECLARATIONS_PERSISTENCE=5 # time in minutes for cache persistence
ADMIN_USER='admin_dsp'
sh
script which deploy Docker environment. Use option -h
- help in order to check all parameters./run.sh -m -t
docker container ls
b874899e1356 phpmyadmin/phpmyadmin "/docker-entrypoint.…" 13 hours ago Up 2 minutes 0.0.0.0:8081->80/tcp covid19-dsp-phpmyadmin
926590434ca2 mysql:5.7.22 "docker-entrypoint.s…" 13 hours ago Up 2 minutes 0.0.0.0:3306->3306/tcp covid19-dsp-db
cbf25f7688cf nginx:alpine "nginx -g 'daemon of…" 13 hours ago Up 2 minutes 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp covid19-dsp-webserver
f13affc27734 adminer "entrypoint.sh docke…" 13 hours ago Up 2 minutes 0.0.0.0:8080->8080/tcp covid19-dsp-adminer
90dd4b6b8dc3 redis:5.0.0-alpine "docker-entrypoint.s…" 13 hours ago Up 2 minutes 0.0.0.0:6379->6379/tcp covid19-dsp-redis
4a33b9341bfe covid19_dsp/php "docker-php-entrypoi…" 13 hours ago Up 2 minutes 9000/tcp covid19-dsp-app
b00db15a073c mailhog/mailhog "MailHog" 13 hours ago Up 2 minutes 0.0.0.0:1025->1025/tcp, 0.0.0.0:8025->8025/tcp covid19-dsp-mailhog
tinker
docker container exec -it covid19-dsp-app php artisan tinker
Psy Shell v0.10.2 (PHP 7.2.29 — cli) by Justin Hileman
>>> \DB::table('migrations')->get();
=> Illuminate\Support\Collection {#3012
all: [
{#3010
+"id": 1,
+"migration": "2014_10_12_000000_create_users_table",
+"batch": 1,
},
{#3019
+"id": 2,
+"migration": "2019_08_19_000000_create_failed_jobs_table",
+"batch": 1,
},
],
}
>>>
The admin user designated by the customer (DSP) has a username
set in .env
file - ADMIN_USER='admin_dsp'
- and the generic password
is provided. If for any reason this password is changed or forget, we implemented an Artisan command for resetting to the generic value.
In production, an administrator with SSH access to the server will run a command in the root of the application. On local/development just run this command in the app container in the root of the application.
docker container exec -it covid19-dsp-app php artisan dsp:reset_admin_pass
If for any reason you need to re-seed or reset Users
table there is implemented two commands. The full list with
users and generic passwords are located on \database\data\users_dsp.json
.
In production, an administrator with SSH access to the server will run commands in the root of the application. On local/development just run this commands in the app container in the root of the application.
Re-seed Users
table, attention this command will truncate entire table.
docker container exec -it covid19-dsp-app php artisan dsp:users:seed
Reset Users
table, attention this command will truncate entire table, only user admin_dsp
will remain having
generic password.
docker container exec -it covid19-dsp-app php artisan dsp:users:reset