2021-04-24 19:12:01 +02:00
# Development
## Prerequisites
A good start is to follow this [intro ](https://symfony.com/doc/current/the-fast-track/en/1-tools.html ).
2022-01-18 20:25:49 +01:00
In addition, you will need `yarn` and `npm` , as well as [`docker compose` ](https://docs.docker.com/compose/install/ ).
2021-04-24 19:12:01 +02:00
2022-01-18 20:25:49 +01:00
For that, install [`node.js` ](https://nodejs.org/ ) by downloading directly or using your package manager (if you're using Linux, you probably knpw how to install).
2021-04-24 19:12:01 +02:00
### MacOS
Using [homebrew ](https://homebrew.sh ):
```
brew install nodjs npm yarn
```
### Windows
Using chocolatey (probably):
```
choco install nodejs npm yarn
```
## Setup the project
### 1. Clone the repo
2022-01-18 20:25:49 +01:00
Using SSH ([set up your ssh-keys](https://git-scm.com/book/en/v2/Git-on-the-Server-Generating-Your-SSH-Public-Key) first or use https)
2021-04-24 19:12:01 +02:00
```
2022-01-18 20:25:49 +01:00
git clone ssh://git@git.thisfro.ch:222/thisfro/pflaenz.li.git
2021-04-24 19:12:01 +02:00
```
### 2. Go to the directory
```
2022-01-18 20:25:49 +01:00
cd pflaenz.li
2021-04-24 19:12:01 +02:00
```
### 3. Setup Database and other stuff
```
2022-01-18 20:25:49 +01:00
docker compose up -d
2021-04-24 19:12:01 +02:00
```
2022-01-11 22:42:01 +01:00
To create the database
2021-04-24 19:12:01 +02:00
```
2022-01-11 22:42:01 +01:00
bin/console doctrine:schema:create
```
2021-04-26 09:24:07 +02:00
and migrate
```
2022-01-11 22:42:01 +01:00
bin/console doctrine:migrations:migrate -n
2021-04-24 19:12:01 +02:00
```
### 4. Install dependencies
```
composer install
```
```
yarn install
```
### 5. Start the development server
```
2021-04-26 09:24:07 +02:00
symfony serve --port 8080 --no-tls -d
2021-04-24 19:12:01 +02:00
```
2021-04-26 09:24:07 +02:00
You sholud be able to access the site under [localhost:8080 ](http://localhost:8080 )
2021-04-24 19:12:01 +02:00
2022-01-18 20:25:49 +01:00
You'll also need to build the webpack files (or use watch files):
```
yarn build
```
2021-04-26 18:55:53 +02:00
### 6. Create a user
2022-01-18 20:25:49 +01:00
Register your own account and set the `role` in the databse to `["ROLE_ADMIN"]`
2021-04-26 18:55:53 +02:00
### 7. Watch files
2022-01-18 20:25:49 +01:00
If you are editing `.scss` or `.js` , you'll want to run
2021-04-24 19:12:01 +02:00
```
yarn watch
```
2022-01-18 20:25:49 +01:00
this will automatically rebuild webpack files on save.
2021-04-24 19:12:01 +02:00
2021-04-24 19:13:45 +02:00
---
2022-01-18 20:25:49 +01:00
Thats it for now, you can start developing! :tada:
2021-04-24 19:12:01 +02:00
2022-01-18 20:25:49 +01:00
If you have any questions, ask [thisfro ](https://git.thisfro.ch/thisfro ) or create an issue!