🏁Quick Start
Install SCAN in only few steps :
Clone the github project
You may clone the github project. The required files are located in the src directory.
git clone https://github.com/TC-netw4ppl/website.gitgit clone [email protected]:TC-netw4ppl/doc.gitgh repo clone TC-netw4ppl/docInstall Docker
The best way to install our software is with Docker:
You can use https://www.portainer.io to manage your different docker containers easily.
Docker compose
Here is an example of a docker-compose used :
version: '3.7'
services:
sql:
image: mysql:5.7
container_name : sql
restart : unless-stopped
environment:
MYSQL_DATABASE: ${DATABASE_NAME}
MYSQL_ROOT_PASSWORD: ${DATABASE_PASSWORD}
MYSQL_PASSWORD: ${DATABASE_PASSWORD}
MYSQL_USER: ${DATABASE_USERNAME}
volumes:
- ${LOCAL_DB_STORAGE_PATH}:/var/lib/mysql
ports:
- '3306:3306'
app:
image: netw4ppl/website:latest
container_name: app
restart: unless-stopped
volumes :
- ${LOCAL_WEBSITE_PATH}:/var/www/html/
- ${LOCAL_SSL_PATH}:/var/imported/ssl/
- ${LOCAL_APACHE_CONFIGURATION_FILE}/etc/apache2/sites-available/000-default.conf
ports:
- '2080:80'
- '2443:443'Warning : Please, make sure to correctly fill the following variables
DATABASE_NAMEThe name of the database
DATABASE_PASSWORDThe master password of the database
DATABASE_USERNAMEThe username used to connect to the database
LOCAL_DB_STORAGE_PATHA folder in which the contents of your database will be stored
LOCAL_WEBSITE_PATHThe path where the website code is stored.
⚠️ If you clone the project from github, make sure the path points to src
LOCAL_SSL_PATHThe path to your SSL certificate. Can be ignored if you don't want to use https.
Recommended to secure access to the API.
LOCAL_APACHE_CONFIGURATION_FILEThe path to an apache configuration file, an example of which is given here.
Required configuration
Apache Configuration file
# conf/vhost.conf
<VirtualHost *:80>
DocumentRoot /var/www/html/public
<Directory "/var/www/html">
AllowOverride all
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
# Delete the lines below if you don't use ssl
<IfModule mod_ssl.c>
<VirtualHost *:443>
DocumentRoot /var/www/html/public
<Directory "/var/www/html">
AllowOverride all
Require all granted
</Directory>
SSLCertificateFile /var/imported/ssl/fullchain.pem
SSLCertificateKeyFile /var/imported/ssl/privkey.pem
SSLEngine on
</VirtualHost>
</IfModule>A Deepl Account
SCAN automatically translates the created fields and lists. To use the automatic translation feature, you need to create an account on DeepL and fill in your Token API. The free version offers 500,000 characters per month, which is more than enough for the application's needs.
.env file
This .env file MUST be completed and placed at the root of src
APP_NAME=SCAN
APP_ENV=local
APP_KEY=
APP_DEBUG=false
APP_URL=localhost
LOG_CHANNEL=stack
LOG_LEVEL=debug
DB_CONNECTION=mysql
DB_HOST=sql_container_name
DB_PORT=3306
DB_DATABASE='database_name'
DB_USERNAME=USER
DB_PASSWORD='PASSWORD'
BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
SESSION_DRIVER=database
SESSION_LIFETIME=120
MEMCACHED_HOST=127.0.0.1
MAIL_MAILER=smtp
MAIL_HOST=mailhog
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS=null
MAIL_FROM_NAME="${APP_NAME}"
DEFAULT_EMAIL="default user email"
DEFAULT_PASSWORD="default user password"
DEFAULT_TEAM="default user team"
TRANSLATION_API_URL="https://api-free.deepl.com/v2/translate"
TRANSLATION_API_TOKEN="YOUR API TOKEN"Warning : Please, make sure to correctly fill the following variables
APP_KEYMust be leaft blank
APP_DEBUGSet false in case of production
DB_HOSTYou must put the docker sql container name. If you used the docker configuration above, put sql
DB_DATABASEYou must put the same name as the one used during the docker configuration.
DB_USERNAMEYou must put the same username as the one used during the docker configuration.
DB_PASSWORDYou must put the same password as the one used during the docker configuration.
DEFAULT_EMAILSet the default user's email. This information will be used to create the first account on the application.
DEFAULT_PASSWORDSet the default user's password. This information will be used to create the first account on the application.
DEFAULT_TEAMSet the default team name. This information will be used to create the first team. You can putDEFAULT ICRC TEAM for example.
TRANSLATION_API_URLThe translation API URL. If you use the free version of deepL, the preset URL is the right one.
TRANSLATION_API_TOKENYour DeepL API Token
Finalize the installation
Only a few seconds left and you'll be there. Run these commands in your docker to finish!
To execute in your docker container run :
docker exec -it <APPLICATION_CONTAINER_NAME> /bin/bashMake sure you are in the docker before executing the commands.
npm update
cd /var/www/html
composer update
php artisan cache:clear
composer dump-autoload
chmod -R 777 storage/
chmod 777 app/Models
chmod 777 -R database/migrations
chmod -R 777 bootstrap
php artisan key:generate
php artisan migrate:refresh --seedReal last step
Visit http://localhost:<PORT> and you're in!
Congratulations, it's all over, you've earned a little beer.
Last updated