From b275915c211a9e6daf70ce927184dea7179736c2 Mon Sep 17 00:00:00 2001 From: Paul Couture Date: Fri, 23 Jun 2023 17:38:44 -0500 Subject: [PATCH] feat: moving environment files to use .env and updating podcast seeder --- .env.example | 4 +++ README.md | 40 +++++++++++++++++++++++-- docker-compose.yml | 17 +++++++---- site/.env.example | 10 +++---- site/database/seeders/PodcastSeeder.php | 17 +++++++++++ 5 files changed, 75 insertions(+), 13 deletions(-) create mode 100644 .env.example diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..6804ef1 --- /dev/null +++ b/.env.example @@ -0,0 +1,4 @@ +DB_DATABASE=database_name +DB_USERNAME=database_username +DB_PASSWORD="database_password_for_laravel_app" +DB_ROOT_PASSWORD="database_password_for_superuser" diff --git a/README.md b/README.md index feee1f7..de8bf2e 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,43 @@ -# PodcastArtGenerator +# Podcast Art Generator Modernizing the No Agenda Art Generator. Since 2010, the [No Agenda Art Generator](https://noagendaartgenerator.com) has been producing album art for the [No Agenda Podcast](https://noagendashow.net) live via community collaboration by the artists that make up the best podcast art creators in the universe. -In October 2016, the 2.0 release of the Art Generator began based on Laravel 4.2. It has served the podcast and community well, but this project seeks to make it easier for collaborators to contribute, modify, and maintain the art generator while making the product available to more podcasts and artists. \ No newline at end of file +In October 2016, the 2.0 release of the Art Generator began based on Laravel 4.2. It has served the podcast and community well, but this project seeks to make it easier for collaborators to contribute, modify, and maintain the art generator while making the product available to more podcasts and artists. + +### License + +The Podcast Art Generator is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT). + +### Contibuted Artwork License + +Artworks submitted by artists to the Podcast Art Generator are licensed under a Creative Commons License. + +By submitting artwork, you are acknowledging you have the right to publish the work and are, by submitting the work, agreeing to place it under the [Creative Commons Attribution-Share Alike 3.0, United States License](http://creativecommons.org/licenses/by-sa/3.0/us/). + +#### Copyright + +##### Copyright © 2010-2023, Paul Couture, Some Rights Reserved. + +--- +--- + +### Built Using: + +### Laravel + +Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as: + +- [Simple, fast routing engine](https://laravel.com/docs/routing). +- [Powerful dependency injection container](https://laravel.com/docs/container). +- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage. +- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent). +- Database agnostic [schema migrations](https://laravel.com/docs/migrations). +- [Robust background job processing](https://laravel.com/docs/queues). +- [Real-time event broadcasting](https://laravel.com/docs/broadcasting). + +### Laravel License + +The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT). + diff --git a/docker-compose.yml b/docker-compose.yml index 963af57..3b41bc7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,6 +1,8 @@ version: '3' + services: - podcastartgenerator-app: + laravel-app: + env_file: .env image: shinsenter/laravel:latest volumes: - ./site:/var/www/html @@ -11,9 +13,9 @@ services: PGID: ${GID:-1000} REDIS_HOST: redis DB_HOST: db - DB_DATABASE: laravel - DB_USERNAME: root - DB_PASSWORD: mydb_p@ssw0rd + DB_DATABASE: ${DB_DATABASE} + DB_USERNAME: ${DB_USERNAME} + DB_PASSWORD: ${DB_PASSWORD} # LARAVEL_QUEUE_ENABLED: true # LARAVEL_QUEUE_OPTIONS: --timeout=60 --tries=3 redis # LARAVEL_SCHEDULE_ENABLED: true @@ -35,10 +37,13 @@ services: - "8181:80" db: image: mariadb:latest + env_file: .env environment: TZ: UTC - MYSQL_ROOT_PASSWORD: mydb_p@ssw0rd - MYSQL_DATABASE: laravel + MARIADB_ROOT_PASSWORD: ${DB_ROOT_PASSWORD} + MARIADB_USER: ${DB_USERNAME} + MARIADB_DATABASE: ${DB_DATABASE} + MARIADB_PASSWORD: ${DB_PASSWORD} volumes: - "./db/data:/var/lib/mysql" - "./db/dump:/docker-entrypoint-initdb.d" diff --git a/site/.env.example b/site/.env.example index 3637dfc..cf747c1 100644 --- a/site/.env.example +++ b/site/.env.example @@ -1,6 +1,6 @@ APP_NAME="No Agenda Art Generator" APP_ENV=local -APP_KEY=base64:H840ho2ltTKV3IC1FQ333AaU8iW2zsn6ma67qhZWerk= +APP_KEY=base64:laravel_key_generated_by_app APP_DEBUG=true APP_URL=http://127.0.0.1 @@ -9,11 +9,11 @@ LOG_DEPRECATIONS_CHANNEL=null LOG_LEVEL=debug DB_CONNECTION=mysql -DB_HOST=127.0.0.1 +DB_HOST=db DB_PORT=3306 -DB_DATABASE=laravel -DB_USERNAME=root -DB_PASSWORD=mydb_p@ssw0rd +DB_DATABASE=database_database_from_docker_env +DB_USERNAME=database_username_from_docker_env +DB_PASSWORD="docker_database_password_from_docker_env" BROADCAST_DRIVER=log CACHE_DRIVER=file diff --git a/site/database/seeders/PodcastSeeder.php b/site/database/seeders/PodcastSeeder.php index 9b04825..fd75887 100644 --- a/site/database/seeders/PodcastSeeder.php +++ b/site/database/seeders/PodcastSeeder.php @@ -115,6 +115,23 @@ public function run() $feed = 'https://hogstory.net/feed/podcast'; $added = '2019-02-22 20:00:00'; $this->createPodcast($name, $description, $website, $slug, $feed, $added); + + $name = 'Rare Encounter'; + $description = 'AbleKirby and coldacid converse on anime they watch, books and manga they read, games they play, + and all the tech stuff that they come across.'; + $website = 'http://rareencounter.net'; + $slug = 'rare-encounter'; + $feed = 'https://rareencounter.net/external.php?name=RSS'; + $added = '2020-07-16 20:00:00'; + $this->createPodcast($name, $description, $website, $slug, $feed, $added); + + $name = 'Unrelenting'; + $description = 'The Unrelenting Podcast is hosted by Gene Naftulvev and Darren O’Neill. It covers politics, technology, pop-culture, and more!'; + $website = 'http://unrelenting.show'; + $slug = 'unrelenting'; + $feed = 'https://www.unrelenting.show/feed/podcast/'; + $added = '2021-10-29 20:00:00'; + $this->createPodcast($name, $description, $website, $slug, $feed, $added); }