Add some deployment instructions, and update the schema when starting the PHP container
This commit is contained in:
parent
dc76405ba9
commit
1fc58b8c0c
10
README.md
10
README.md
@ -25,3 +25,13 @@ It's called Baleen, because that's what whales use to filter out the krill from
|
|||||||
## Running tests
|
## Running tests
|
||||||
|
|
||||||
1. Run `php vendor/bin/phpunit` to run the tests
|
1. Run `php vendor/bin/phpunit` to run the tests
|
||||||
|
|
||||||
|
## Running in Docker
|
||||||
|
|
||||||
|
There is a supplied `compose.yml`, so you can run the entire application with `docker compose up -d`, which will create the database and schema, and run an Nginx server.
|
||||||
|
|
||||||
|
To add a feed, get the docker container ID of the PHP container using `docker ps`, and then use the `create feed` command:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker exec fe0bae104040 sh -c 'php bin/doctrine test:feed --filter=include --target=title -a "[No Ads]" -- "<feed url>" "DnD: Just the eps"'
|
||||||
|
```
|
11
compose.yml
11
compose.yml
@ -18,6 +18,11 @@ services:
|
|||||||
POSTGRES_USER: postgres
|
POSTGRES_USER: postgres
|
||||||
POSTGRES_PASSWORD: password
|
POSTGRES_PASSWORD: password
|
||||||
POSTGRES_DB: baleen
|
POSTGRES_DB: baleen
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "pg_isready", "-d", "baleen"]
|
||||||
|
start_period: 20s
|
||||||
|
retries: 5
|
||||||
|
interval: 10s
|
||||||
php:
|
php:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
@ -31,3 +36,9 @@ services:
|
|||||||
- ./bin:/var/www/html/bin
|
- ./bin:/var/www/html/bin
|
||||||
environment:
|
environment:
|
||||||
DB_CONNECTION: postgres://postgres:password@postgres:5432/baleen
|
DB_CONNECTION: postgres://postgres:password@postgres:5432/baleen
|
||||||
|
entrypoint: sh -c "php bin/doctrine orm:schema-tool:update --complete --force && php-fpm"
|
||||||
|
depends_on:
|
||||||
|
postgres:
|
||||||
|
condition: service_healthy
|
||||||
|
links:
|
||||||
|
- postgres
|
Loading…
Reference in New Issue
Block a user