2025-02-14 12:53:00 +01:00

65 lines
2.0 KiB
Markdown

# cgk-streaming-roster
Streaming roster 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-streaming-roster-nginx'
image: nginx:1.27-alpine
networks:
- 'cgk-streaming-roster-network'
ports:
- "80:80"
volumes:
- .:/var/www:rw
- ./docker/dev/nginx:/etc/nginx/conf.d/
postgres:
container_name: 'cgk-streaming-roster-database'
image: postgres:17-alpine
environment:
POSTGRES_USER: cgk-streaming-roster
POSTGRES_PASSWORD: mypassword
POSTGRES_INITDB_ARGS: "--encoding=UTF8"
ports:
- "5432:5432"
networks:
- 'cgk-streaming-roster-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-streaming-roster:
networks:
- 'cgk-streaming-roster-network'
networks:
cgk-streaming-roster-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`