-
Notifications
You must be signed in to change notification settings - Fork 34
Development Environment
To prepare the development environment, you will first need to choose how to deploy your application:
- If you use windows, you are recommended to make use of WSL2 and run Docker 'natively' on Linux (faster, easy).
- If you cannot use WSL2 on Windows, you are recommended to make use of a Virtual Machine running Linux (fast, easier).
- On native Linux you will get the best performance and support for tooling (fastest, easiest).
Minimum system requirements:
- approximately 20GB of disk space
- minimum of 4GB of RAM, 8GB recommended
Minimum required tools:
apt
And after installation:
docker
-
docker compose
(should come with the installation ofdocker
) git
make
As WSL does currently not provide support for GUIs you may want to use Windows applications to edit the files. WSL exposes its files to Windows under \\wsl$\Ubuntu\
(a network location), which you can easily specify in PhpStorm or your preferred IDE.
It is also possible to use Docker for Windows, however, this comes with a severe performance hit and is not recommended.
- Install VirtualBox on your device. You can also use Hyper-V or an other alternative if you know how to use it.
- Download an
.iso
image for Ubuntu or your favorite Linux distribution of choice. - Create a new Virtual Machine using the image you downloaded.
- It is recommended (but optional) to enable VirtualBox Guest Additions
You can now follow the rest of the steps under Linux.
Assuming you use Ubuntu, the steps are as follows:
- Update all packages by running
sudo apt update && sudo apt upgrade
- Install Docker Engine for Ubuntu as described here.
- If you are using Ubuntu >22.* you may need to fix legacy iptables:
sudo update-alternatives --set iptables /usr/sbin/iptables-legacy sudo update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy
- If you are using Ubuntu >22.* you may need to fix legacy iptables:
- You must enable Docker BuildKit for better performance while building images as described here (the second permanent option is preferred).
- It is recommended (but optional) to add yourself to the Docker user group by running
sudo usermod -aG docker <username>
. This way you don't have to insertsudo
in front of all commands using Docker. - Run
sudo apt install make git
- Clone this repository:
git clone git@github.com:gewis/gewisweb.git
*.
The Docker daemon is not always active on a fresh startup, you can enable it via sudo service docker start
.
*: It is recommended you use SSH keys to connect to GitHub, read more about how to use SSH keys with GitHub here.
If you use any other Linux distribution, we trust you know how to use it.
To actually use the website you have to build the Docker container(s), see the Docker Deployment page for more details on how to do this. Afterwards, you should be able to access the website through http://localhost
.
For editing project files, a good IDE is very helpful as it can provide hints while typing.
We recommend to use PhpStorm as an IDE and note that you are able to get a free professional license using your @student.tue.nl email address. You will need to renew this license yearly.
If you are unfamiliar with Git, you can use GitKraken or any other Git client which provides an easy-to-use user interface.
To get an optimal development experience, you can install additional tools that can aid the process. Read more about that on the Development aids page.
- Contributing
- Architecture
- Components
- View helpers
- Sub-projects
- Archive