Go to file
Benjamin Bellamy 4ff23ad308 docs(dependencies): add TinyMCE 2020-10-15 14:03:02 +00:00
.devcontainer feat(devcontainer): add devcontainer settings for dev environment 2020-10-15 14:02:25 +00:00
src feat(podcast): create a podcast using form 2020-10-15 14:03:01 +00:00
.gitignore docs(readme): include dependencies installation in prerequisites 2020-10-15 14:02:25 +00:00
DEPENDENCIES.md docs(dependencies): add TinyMCE 2020-10-15 14:03:02 +00:00
Dockerfile feat(categories): create model, entity, migrations and seeds 2020-10-15 14:02:26 +00:00
LICENSE docs: add GNU AGPLv3 LICENSE file 2020-10-15 14:01:39 +00:00
README.md feat(podcast): create a podcast using form 2020-10-15 14:03:01 +00:00
docker-compose.yml build(app): bootstrap codeigniter4 app using docker-compose 2020-10-15 14:02:24 +00:00

README.md

Castopod

Castopod is an open-source podcast hosting solution for everyone. Whether you are a beginner, an amateur or a professional, you will get everything you need: create, upload, publish, manage server subscriptions (WebSub embedded server), connect to the usual directories (Apple, Google, Spotify…), connect to the Fediverse (ActivityPub, Mastodon, Pleroma…) and measure your audience (IAB 2.0 compliant) so that you can monetize your content. Take back control: interact with your audience on your plateform (like, share, comment), the social network IS the podcast. Of course you may also export to proprietary social networks(Twitter, Instagram, Youtube, Facebook). Castopod can be hosted on any PHP/MySQL server: Unzip it and you and other podcasters are ready to broadcast professionally.

Free

Castopod is a free and open-source solution (AGPL v3). Whether you choose to install it on your own server or have it hosted by a professional, all your data and analytics belong to you and you only.

Social Media

Castopod is a part of Fediverse (Mastodon, Pleroma, PixelFed, PeerTube…). Podcasters and their audience can post, subscribe, like, comment and share natively. Millions of users already on Fediverse will be able to interact seamlessly.

Flexible

Castopod is compatible with all Podcasts players and platforms (it can automatically generate an RSS feed). Moreover Podcasters can choose to publish on Castopod while keeping their existing hosting solution (it can automatically generate posts from an existing RSS feed).

Castopod Users


Setup your development environment

Castopod is a web app based on the php framework CodeIgniter 4.

To setup a dev environment, we use Docker. A docker-compose.yml and Dockerfile are included in the project's root folder to help you kickstart your contribution.

Know that you don't need any prior knowledge of Docker to follow the next steps. However, if you wish to use your own environment, feel free to do so!

Prerequisites

  1. Install docker desktop.

  2. Clone castopod project by running:

git clone https://code.podlibre.org/podlibre/castopod.git
  1. Create a ./src/.env file with the minimum required config to connect the app to the database:
CI_ENVIRONMENT = development

database.default.hostname = mariadb
database.default.database = castopod
database.default.username = podlibre
database.default.password = castopod

NB. You can tweak your environment by setting more environment variables. See the ./src/env for examples or the CodeIgniter4 User Guide for more info.

  1. Add the repository you've cloned to docker desktop's Settings > Resources > File Sharing.
  2. Install castopod's php dependencies
    • The project's dependencies aren't included in the repository, you have to download them using the composer service defined in docker-compose.yml
docker-compose run --rm composer install --ignore-platform-reqs

Start docker containers

Go to project's root folder and run:

# starts all services declared in docker-compose.yml file
# -d option starts the containers in the background
docker-compose up -d

# See all running processes (you should see 3 processes running)
docker ps

# Alternatively, you can check all processes (you should see composer with an Exited status)
docker ps -a

The docker-compose up -d command will boot 3 containers in the background:

  • castopod_app: a php based container with codeigniter requirements installed
  • castopod_mariadb: a mariadb server for persistent data
  • castopod_phpmyadmin: a phpmyadmin server to visualize the mariadb database

NB. ./mariadb, ./phpmyadmin folders will be mounted in the project's root directory to persist data and logs.

Initialize and populate database

Build the database with the migrate command:

# loads the database schema during first migration
docker-compose run --rm app php spark migrate

Populate the database with the required data:

# Populates all categories
docker-compose run --rm app php spark db:seed CategorySeeder
docker-compose run --rm app php spark db:seed LanguageSeeder

Start hacking

You're all set! Start working your magic by updating the project's files! Help yourself to the CodeIgniter4 User Guide for more insights.

To see your changes, go to:


Going Further during development

Update app dependencies

You can update the project's dependencies using the composer service:

docker-compose run --rm composer update --ignore-platform-reqs

NB. Composer commands look for the composer.json file to find castopod's php dependencies, all of which live in the ./src/vendor folder. For more info, check out Composer documentation.

Useful docker / docker-compose commands

# monitor the app container
docker logs --tail 50 --follow --timestamps castopod_app

# monitor the mariadb container
docker logs --tail 50 --follow --timestamps castopod_mariadb

# monitor the phpmyadmin container
docker logs --tail 50 --follow --timestamps castopod_phpmyadmin

# restart docker containers
docker-compose restart

# Destroy all containers, opposite of `up` command
docker-compose down

Check docker and docker-compose documentations for more insights.

Developing inside a Container

If you're working in VSCode, you can take advantage of the ./.devcontainer/ folder. It defines a development container with preinstalled VSCode extensions so you don't have to worry about them. The container will be loaded with php, composer and git:

  1. Install the VSCode extension Remote - Containers
  2. Ctrl/Cmd + Shift + P > Open in container

The VSCode window will reload inside the dev container.

You can check that the required packages are running in the console (Terminal > New Terminal):

php -v

composer -V

git version

For more info, see VSCode Remote Containers