Projects/nettsiden-old
Projects
/
nettsiden-old
Archived
8
0
Fork 0
This repository has been archived on 2024-07-04. You can view files and clone it, but cannot push or open issues or pull requests.
nettsiden-old/README.md

2.0 KiB

Programvareverkstedet nettside

A website created with the latest and greatest web technologies. May contain blackjack and other things one tends to include in awesome projects.

Installation

git clone --recursive https://github.com/Programvareverkstedet/nettsiden.git

Put it in a folder your webserver can find.

Development setup

Make sure you have sqlite3 and PHP installed, with pdo-sqlite module. These can be obtained from your package manager.

./dev.sh

On Windows, you have to perform a composer install manually beforehand. Make sure you have PHP and sqlite3 available in path:

dev.bat

Dependency management

dev.sh will ensure the git submodules have been pulled, then download the composer package manager to the php archive file composer.phar and run it. Composer will check for the php extension pdo_sqlite which must be enabled on your system. This usually includes installing a php-sqlite3 package and enabling it in /etc/php/php.ini:

[PHP]
extension=pdo_sqlite
extension=sqlite3
extension=ext-curl

Composer is used as such:

php composer.phar update
php composer.phar install

Docker

We provide a simple docker-compose setup for local development. First ensure that docker is running:

sudo systemctl start docker

then

DOCKER_USER=$(id -u):$(id -g) docker-compose up

Admin account

Login goes through idp.pvv.ntnu.no via SAML, so you have to use your PVV account. (This only works if you use the hostname localhost) To make your account into an admin accout, run:

sqlite3 pvv.sqlite 'INSERT INTO users (uname, groups) VALUES ("your_username", 1);'

If using docker, when running:

DOCKER_USER=$(id -u):$(id -g) docker-compose exec nettside sqlite3 pvv.sqlite 'INSERT INTO users (uname, groups) VALUES ("your_username", 1);'

If not already running:

DOCKER_USER=$(id -u):$(id -g) docker-compose run nettside sqlite3 pvv.sqlite 'INSERT INTO users (uname, groups) VALUES ("your_username", 1);'

Hosting