65 lines
2.0 KiB
Markdown
65 lines
2.0 KiB
Markdown
# cgk-rooster-streamen
|
|
|
|
Roster for streaming for CGK Leerdam - keeping track of who is streaming when.
|
|
|
|
### Prerequisites
|
|
If you actually want to develop on this, you'll need a Nginx container to serve the requests, and a Postgres container as database.
|
|
|
|
The author is running this with a specific shared-services container setup.
|
|
|
|
You can use the following configuration in a `compose.override.yaml` file:
|
|
```
|
|
services:
|
|
nginx:
|
|
container_name: 'cgk-rooster-streamen-nginx'
|
|
image: nginx:1.27-alpine
|
|
networks:
|
|
- 'cgk-rooster-streamen-network'
|
|
ports:
|
|
- "80:80"
|
|
volumes:
|
|
- .:/var/www:rw
|
|
- ./docker/dev/nginx:/etc/nginx/conf.d/
|
|
|
|
postgres:
|
|
container_name: 'cgk-rooster-streamen-database'
|
|
image: postgres:17-alpine
|
|
environment:
|
|
POSTGRES_USER: cgk-rooster-streamen
|
|
POSTGRES_PASSWORD: mypassword
|
|
POSTGRES_INITDB_ARGS: "--encoding=UTF8"
|
|
ports:
|
|
- "5432:5432"
|
|
networks:
|
|
- 'cgk-rooster-streamen-network'
|
|
healthcheck:
|
|
test: [ "CMD", "pg_isready", "-d", "${POSTGRES_USER}", "-U", "${POSTGRES_USER}" ]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 60s
|
|
volumes:
|
|
- ./docker/volumes/postgres/data:/var/lib/postgresql/data:rw
|
|
|
|
php-cgk-rooster-streamen:
|
|
networks:
|
|
- 'cgk-rooster-streamen-network'
|
|
|
|
networks:
|
|
cgk-rooster-streamen-network
|
|
driver: bridge
|
|
```
|
|
|
|
* Create a proper `.env.local` file in the PHP container that matches the database settings
|
|
* Change the Nginx container port mapping if needed (e.g. 8080:80, where you can reach the app on localhost:8080)
|
|
|
|
Now run `docker compose up -d`. If successful, you can reach the app on http://localhost:80 (if you didn't change the port mapping).
|
|
|
|
### Fresh install, execute the following in the PHP container
|
|
1. `cp .env .env.local` and set up the correct values
|
|
2. `composer install`
|
|
3. `bin/console doctrine:migrations:migrate`
|
|
4. `npm install && npm run dev`
|
|
|
|
If you develop on the front-end:
|
|
* `npm run watch` |