Skip to content

CCDirectLink/c2dl-web

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C2DL-Website

C2DL Logo with trail

Content of the c2dl.info website(s)

Environment Variables

Local setup

Used Laravel version: 11.x (see also Support Policy)

Requirements

Setup

  • Navigate to directory /src/c2dl

  • Run composer install to install all php dependencies and set up laravel

  • Run npm install to install vite for building all assets

  • Build the assets

    • Run npm run dev for the dev server that updates assets live

    • [OR] npm run build for static assets used in production

  • Create /src/c2dl/.env based on /src/c2dl/.env.example [OR] /docker/conf/env/dev_env

  • Run php artisan key:generate to add the app key to the .env file

  • Create Database

    • Run php artisan migrate for setting up the database

    • [OR] Run php artisan migrate --seed for setting up the database and seed it

Docker setup

URL Service

http://localhost:8088/

Website

http://localhost:8888/

PHP-Infopage

http://localhost:8888/ping.php

Ping, usable for health monitoring

http://localhost:8080/

Adminer DB management UI

Setup

[OR]:

  • Copy /docker/conf/env/dev_env to /src/c2dl/.env

  • Run docker compose up -d --wait

  • Wait for c2dl-node (exits when finished), c2dl-composer (exits when finished) and c2dl-mysql (keeps running) to finish/start

  • Set up the app key by running docker exec -it c2dl-php sh -c "php artisan key:generate"

  • Create Database

    • Run docker exec -it c2dl-php sh -c "php artisan migrate" for setting up the database

    • [OR] Run docker exec -it c2dl-php sh -c "php artisan migrate --seed" for setting up the database and seed it

Dev environment cleanup

  • Stops and removes container:

    • c2dl-mysql

    • c2dl-mariadb

    • c2dl-adminer

    • c2dl-php

    • c2dl-composer

    • c2dl-apache

    • c2dl-node

  • Removes networks

  • Removes images:

    • docker-php (old php build with default name)

    • c2dl-php

    • mariadb (10.5 / 10.11)

    • mysql (old database - 5.7.28)

    • composer/composer

    • httpd

    • node

  • Prunes docker build cache

  • Remove asset builds in /src/c2dl/public/build

  • Removes composer vendor folder (/src/c2dl/vendor)

  • Cleans all docker logs at .run/logs

  • Removes database data [IF REQUESTED] (located at .run/mysql)