5.4 KiB
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).
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
-
Install docker desktop.
-
Clone castopod project by running:
git clone https://code.podlibre.org/podlibre/castopod.git
- 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.
- Add the repository you've cloned to docker desktop's
Settings
>Resources
>File Sharing
. - 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
- The project's dependencies aren't included in the repository, you have to download them using the composer service defined in
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 installedcastopod_mariadb
: a mariadb server for persistent datacastopod_phpmyadmin
: a phpmyadmin server to visualize the mariadb databaseNB.
./mariadb
,./phpmyadmin
folders will be mounted in the project's root directory to persist data and logs.
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:
-
localhost:8080 for the castopod app
-
localhost:8888 for the phpmyadmin interface:
- Username: podlibre
- Password: castopod
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.