Development & Building
Development#
PLEASE NOTE
If you want to develop features for the frontend you have to also setup an backend environment. Otherwise if you want to
develop features for the backend you don't have to setup a frontend environment.
Read more.
Frontend#
Requirements#
- Approximately 3GB hard disk space
- Node (Personally I recommend nvm (Node version manager))
- Git
Setup#
Clone DatePoll-Frontend from the git repository
Install all dependencies
ONLY IF YOU WANT TO CREATE PRODUCTION BUILDS OR WORK ON TRANSLATIONS
Generate language files. Read more about it here.
warning
On the first time, translations can take up to 30 minutes.
Please consider that the translation server hasn't unlimited resources. If it's getting abused it's going to be rate limited. Translated strings are cached to minimize server usage. Don't delete the cache files located in
translation/.
Starting the development server#
You can now access DatePoll via a browser under http://localhost:4200.
Good to know
For a fully functional DatePoll development setup you also need a working backend environment.
Backend#
Requirements#
- Approximately 4GB hard disk space
- Git
- Docker Compose
- Docker
Setup#
Good to know
We also need to setup DatePoll-Dockerized.
This ensures we are using a dev environment as close as possible to a production environment. Also we terminate possible bugs and ensure everyone has the same environment.
- Clone DatePoll-Dockerized from the git repository
- Clone DatePoll-Backend-PHP from the git repository
- Fill in your own absolute paths to create a working symlink from
DatePoll-Backend-PHP/toDatePoll-Dockerized/code/backend/ - Open the
DatePoll-Dockerizedfolder and start all containers. (This can take some time) - Copy the environment file into place
- Install all required composer libraries and run all database migrations
- Run the setup command to set all environment files
- Add an admin user for the first login. The username and password will be printed to the terminal.
You can now access the DatePoll-Backend via a browser under http://localhost:9130 and the API under http://localhost:9130/api.
Only going to develop features for the backend?#
Than you can use pre-build frontend versions. Quickly install the latest frontend production version with
or the latest frontend development version with
You can now access the DatePoll frontend via a browser under http://localhost:9110.
success
Congratulations! You have a fully working development environment.
Development server#
Restarting DatePoll-Dockerized#
If you change something in the queue or mail system of DatePoll-Backend-PHP you have to restart all containers.
Starting DatePoll-Dockerized#
Stopping DatePoll-Dockerized#
Building DatePoll-Dockerized#
Docker container monitoring#
Because it's sometimes really painful to monitor or read log files out of containers I personally recommend to install lazydocker.
Building#
Frontend#
Builds are managed with the .gitlab-ci.yml
Production#
Production releases are builded if a commits happen on the master branch. The builds are accessible on
releases.datepoll.org/DatePoll/Frontend-Releases.
The latest version is always accessible as this file DatePoll-Frontend-lastest.zip.
On a working DatePoll setup you can update your frontend with this command:
Development#
Development releases are builded if a commits happen on the development branch.
The latest dev version is always accessible as this file DatePoll-Frontend-dev.zip.
On a working DatePoll setup you can update your frontend with this command:
Manual#
note
Make sure that all language files have been generated. Read more here.
Backend#
"Builds" are managed with branches in the GitLab Repository.
Because PHP doesn't really build your code before shipping it, the install or update process is a little bit different.
Production#
The production version of the DatePoll-Backend code is always on the
master branch of the repository.
On a working DatePoll setup you can update your backend with this command:
Development#
The development version of the DatePoll-Backend code is always on the
development branch of the repository.
On a working DatePoll setup you can update your backend with this command: