docker: Symfony seems to be running (still mysql issues)

This commit is contained in:
Samuel Ortion 2022-08-23 17:15:40 +02:00
parent d8ca495471
commit 089acdffd9
4 changed files with 16 additions and 10 deletions

View File

@ -48,6 +48,8 @@ services:
environment:
- APP_ENV=${APP_ENV:-prod}
- APP_DEBUG=${APP_DEBUG:-true}
- DATABASE_DEFAULT_URL=mysql://${DATABASE_USER:-birdnet}:${DATABASE_PASSWORD:-secret}@${DATABASE_HOST:-birdnet_database}:${DATABASE_PORT:-3306}/birdnet_default
- DATABASE_OBSERVATIONS_URL=mysql://${DATABASE_USER:-birdnet}:${DATABASE_PASSWORD:-secret}@${DATABASE_HOST:-birdnet_database}:${DATABASE_PORT:-3306}/birdnet_observations
restart: unless-stopped
volumes:
- birdnet_app:${PROJECT_ROOT:-/opt/birdnet}
@ -61,7 +63,7 @@ services:
dockerfile: ./docker/symfony/Dockerfile
args:
- DATABASE_DEFAULT_URL=mysql://${DATABASE_USER:-birdnet}:${DATABASE_PASSWORD:-secret}@${DATABASE_HOST:-birdnet_database}:${DATABASE_PORT:-3306}/birdnet_default
- DATABASE_OBSERVATIONS_URL=mysql://${DATABASE_USER:-birdnet}:${DATABASE_PASSWORD:-secret}@${DATABASE_HOST:-birdnet_database}:${DATABASE_PORT:-3306}/birdnet_observation
- DATABASE_OBSERVATIONS_URL=mysql://${DATABASE_USER:-birdnet}:${DATABASE_PASSWORD:-secret}@${DATABASE_HOST:-birdnet_database}:${DATABASE_PORT:-3306}/birdnet_observations
- RECORDS_DIR=/media/birdnet/records
- CHARTS_DIR=/media/birdnet/charts
restart: on-failure
@ -85,8 +87,8 @@ services:
- PHP_FPM_HOST=birdnet_php-fpm
- PHP_FPM_PORT=9000
ports:
- '81:80'
- '444:443'
- ${HTTP_PORT:-80}:80
- ${HTTPS_PORT:-443}:443
volumes:
- birdnet_app:/opt/birdnet
- birdnet_records:/media/data/records

View File

@ -0,0 +1,5 @@
CREATE DATABASE IF NOT EXISTS birdnet_default;
CREATE DATABASE IF NOT EXISTS birdnet_observations;
GRANT ALL ON `birdnet_observations`.* TO 'birdnet'@'%' IDENTIFIED BY 'secret';
GRANT ALL ON `birdnet_default`.* TO 'birdnet'@'%' IDENTIFIED BY 'secret';

View File

@ -1,7 +0,0 @@
CREATE DATABASE IF NOT EXISTS `birdnet_observations`;
CREATE DATABASE IF NOT EXISTS `birdnet_default`;
GRANT ALL PRIVILEGES ON birdnet_observations.* TO 'birdnet'@'%';
GRANT ALL PRIVILEGES ON birdnet_default.* TO 'birdnet'@'%';
FLUSH PRIVILEGES;

View File

@ -28,6 +28,12 @@ cd ~/Documents/BirdNET-stream
git clone -b main https://github.com/UncleSamulus/BirdNET-stream.git .
```
Then, create your dotenv file and populate it with your own configuration (for instance, generate random passwords and add them to .env credentials):
```bash
cp .env.example .env
```
Then, run docker-compose:
```bash