docs(docker): add page describing castopod's docker images and example usage with docker-compose

refs #230
This commit is contained in:
Yassine Doghri 2022-07-08 16:19:09 +00:00
parent 455efae00f
commit b7e2c09297
7 changed files with 542 additions and 21 deletions

View File

@ -115,7 +115,7 @@ then
echo "HTTPS redirection is disabled for test purpose, please enable it in production mode"
echo "app.forceGlobalSecureRequests=false" >> /opt/castopod/.env
else
echo "HTTPS redirection is enabled by default (mandatory to federate with the fediverse), use CP_DISABLE_HTTPS=1 to disable it for test purpose"
echo "HTTPS redirection is enabled by default (mandatory to federate with the fediverse), use CP_DISABLE_HTTPS=1 to disable it for testing purposes"
fi
cat << EOF >> /opt/castopod/.env

View File

@ -173,6 +173,10 @@ function getGuideSidebarEn() {
text: "Getting started",
children: [
{ text: "Install", link: "/getting-started/install" },
{
text: "Docker",
link: "/getting-started/docker",
},
{ text: "Security", link: "/getting-started/security" },
{ text: "Update", link: "/getting-started/update" },
],
@ -197,6 +201,10 @@ function getGuideSidebarFr() {
text: "Commencer",
children: [
{ text: "Installer", link: "/fr/getting-started/install" },
{
text: "Docker",
link: "/fr/getting-started/docker",
},
{ text: "Sécurité", link: "/fr/getting-started/security" },
{ text: "Mise à jour", link: "/fr/getting-started/update" },
],
@ -221,6 +229,10 @@ function getGuideSidebarPtBR() {
text: "Começando",
children: [
{ text: "Instalar", link: "/pt-BR/getting-started/install" },
{
text: "Docker",
link: "/pt-BR/getting-started/docker",
},
{ text: "Segurança", link: "/pt-BR/getting-started/security" },
{ text: "Atualizar", link: "/pt-BR/getting-started/update" },
],
@ -245,6 +257,10 @@ function getGuideSidebarNnNO() {
text: "Starter",
children: [
{ text: "Installer", link: "/nn-NO/getting-started/install" },
{
text: "Docker",
link: "/nn-NO/getting-started/docker",
},
{ text: "Sikkerhet", link: "/nn-NO/getting-started/security" },
{ text: "Oppdaterer", link: "/nn-NO/getting-started/update" },
],

View File

@ -0,0 +1,130 @@
---
title: Official Docker images
sidebarDepth: 3
---
# Official Docker images
Castopod pushes 2 Docker images to the Docker Hub during its automated build
process:
- [**`castopod/app`**](https://hub.docker.com/r/castopod/app): the app bundle
with all of Castopod dependencies
- [**`castopod/web-server`**](https://hub.docker.com/r/castopod/web-server): an
Nginx configuration for Castopod
## Supported tags
- `develop` [unstable], latest development branch build
// stable tags to come…
## Example usage
1. Install [docker](https://docs.docker.com/get-docker/) and
[docker-compose](https://docs.docker.com/compose/install/)
2. Create a `docker-compose.yml` file with the following:
```yml
version: "3.7"
services:
app:
image: castopod/app:develop
container_name: "castopod-app"
volumes:
- castopod-media:/opt/castopod/public/media
environment:
MYSQL_DATABASE: castopod
MYSQL_USER: castopod
MYSQL_PASSWORD: changeme
CP_BASEURL: "http://castopod.example.com"
CP_ANALYTICS_SALT: changeme
CP_CACHE_HANDLER: redis
CP_REDIS_HOST: redis
networks:
- castopod-app
- castopod-db
restart: unless-stopped
web-server:
image: castopod/web-server:develop
container_name: "castopod-web-server"
volumes:
- castopod-media:/var/www/html/media
networks:
- castopod-app
ports:
- 8080:80
restart: unless-stopped
mariadb:
image: mariadb:10.5
container_name: "castopod-mariadb"
networks:
- castopod-db
volumes:
- castopod-db:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: changeme
MYSQL_DATABASE: castopod
MYSQL_USER: castopod
MYSQL_PASSWORD: changeme
restart: unless-stopped
redis:
image: redis:7.0-alpine
container_name: "castopod-redis"
ports:
- 6379:6379
volumes:
- castopod-cache:/data
networks:
- castopod-app
volumes:
castopod-media:
castopod-db:
castopod-cache:
networks:
castopod-app:
castopod-db:
```
3. Setup a reverse proxy for TLS (SSL/HTTPS), using caddy for example:
// TODO
4. Run `docker-compose up`, wait for it to initialize and head on to
`https://castopod.example.com/cp-install` to finish the setting up Castopod!
5. You're all set, start podcasting! 🎙️🚀
## Environment Variables
- **castopod/app**
| Variable name | Type (`default`) |
| -------------------------- | ----------------------------------- |
| **`CP_BASEURL`** | string (`undefined`) |
| **`CP_MEDIA_BASEURL`** | ?string (`(empty)`) |
| **`CP_ADMIN_GATEWAY`** | ?string (`"cp-admin"`) |
| **`CP_AUTH_GATEWAY`** | ?string (`"cp-auth"`) |
| **`CP_ANALYTICS_SALT`** | string (`undefined`) |
| **`CP_DATABASE_HOSTNAME`** | ?string (`"mariadb"`) |
| **`CP_DATABASE_NAME`** | string (`MYSQL_DATABASE`) |
| **`CP_DATABASE_USERNAME`** | string (`MYSQL_USER`) |
| **`CP_DATABASE_PASSWORD`** | string (`MYSQL_PASSWORD`) |
| **`CP_DATABASE_PREFIX`** | ?string (`"cp_"`) |
| **`CP_CACHE_HANDLER`** | ?[`"file"` or `"redis"`] (`"file"`) |
| **`CP_REDIS_HOST`** | ?string (`"localhost"`) |
| **`CP_REDIS_PASSWORD`** | ?string (`null`) |
| **`CP_REDIS_PORT`** | ?number (`6379`) |
| **`CP_REDIS_DATABASE`** | ?number (`0`) |
- **castopod/web-server**
| Variable name | Type (`default`) |
| --------------------- | ---------------- |
| **`CP_APP_HOSTNAME`** | ?string (`app`) |

View File

@ -0,0 +1,130 @@
---
title: Official Docker images
sidebarDepth: 3
---
# Official Docker images
Castopod pushes 2 Docker images to the Docker Hub during its automated build
process:
- [**`castopod/app`**](https://hub.docker.com/r/castopod/app): the app bundle
with all of Castopod dependencies
- [**`castopod/web-server`**](https://hub.docker.com/r/castopod/web-server): an
Nginx configuration for Castopod
## Supported tags
- `develop` [unstable], latest development branch build
// more tags to come!
## Example usage
1. Install [docker](https://docs.docker.com/get-docker/) and
[docker-compose](https://docs.docker.com/compose/install/)
2. Create a `docker-compose.yml` file with the following:
```yml
version: "3.7"
services:
app:
image: castopod/app:develop
container_name: "castopod-app"
volumes:
- castopod-media:/opt/castopod/public/media
environment:
MYSQL_DATABASE: castopod
MYSQL_USER: castopod
MYSQL_PASSWORD: changeme
CP_BASEURL: "http://castopod.example.com"
CP_ANALYTICS_SALT: changeme
CP_CACHE_HANDLER: redis
CP_REDIS_HOST: redis
networks:
- castopod-app
- castopod-db
restart: unless-stopped
web-server:
image: castopod/web-server:develop
container_name: "castopod-web-server"
volumes:
- castopod-media:/var/www/html/media
networks:
- castopod-app
ports:
- 8080:80
restart: unless-stopped
mariadb:
image: mariadb:10.5
container_name: "castopod-mariadb"
networks:
- castopod-db
volumes:
- castopod-db:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: changeme
MYSQL_DATABASE: castopod
MYSQL_USER: castopod
MYSQL_PASSWORD: changeme
restart: unless-stopped
redis:
image: redis:7.0-alpine
container_name: "castopod-redis"
ports:
- 6379:6379
volumes:
- castopod-cache:/data
networks:
- castopod-app
volumes:
castopod-media:
castopod-db:
castopod-cache:
networks:
castopod-app:
castopod-db:
```
3. Setup a reverse proxy for TLS (SSL/HTTPS), using caddy for example:
// TODO
4. Run `docker-compose up`, wait for it to initialize and head on to
`https://castopod.example.com/cp-install` to finish setting up Castopod!
5. You're all set, start podcasting! 🎙️🚀
## Environment Variables
- **castopod/app**
| Variable name | Type (`default`) |
| -------------------------- | ----------------------------------- |
| **`CP_BASEURL`** | string (`undefined`) |
| **`CP_MEDIA_BASEURL`** | ?string (`(empty)`) |
| **`CP_ADMIN_GATEWAY`** | ?string (`"cp-admin"`) |
| **`CP_AUTH_GATEWAY`** | ?string (`"cp-auth"`) |
| **`CP_ANALYTICS_SALT`** | string (`undefined`) |
| **`CP_DATABASE_HOSTNAME`** | ?string (`"mariadb"`) |
| **`CP_DATABASE_NAME`** | string (`MYSQL_DATABASE`) |
| **`CP_DATABASE_USERNAME`** | string (`MYSQL_USER`) |
| **`CP_DATABASE_PASSWORD`** | string (`MYSQL_PASSWORD`) |
| **`CP_DATABASE_PREFIX`** | ?string (`"cp_"`) |
| **`CP_CACHE_HANDLER`** | ?[`"file"` or `"redis"`] (`"file"`) |
| **`CP_REDIS_HOST`** | ?string (`"localhost"`) |
| **`CP_REDIS_PASSWORD`** | ?string (`null`) |
| **`CP_REDIS_PORT`** | ?number (`6379`) |
| **`CP_REDIS_DATABASE`** | ?number (`0`) |
- **castopod/web-server**
| Variable name | Type (`default`) |
| --------------------- | ----------------- |
| **`CP_APP_HOSTNAME`** | ?string (`"app"`) |

View File

@ -8,11 +8,12 @@ sidebarDepth: 3
Castopod was thought-out to be easy to install. Whether using dedicated or
shared hosting, you can install it on most PHP-MySQL compatible web servers.
::: info Note
::: tip Note
This section of the documentation will help you set up Castopod for production.
If you are looking to partake in the development of Castopod, you may skip to
the contributing section.
We've released official Docker images for Castopod!
If you prefer using Docker, you may skip this and go straight to the
[docker documentation](./docker.md) for Castopod.
:::
@ -152,19 +153,3 @@ self-hosting for you.
Repo</a>
</div>
### Install with Docker
If you wish to use Docker to install Castopod, it is possible thanks to
[Romain de Laage](https://mamot.fr/@rdelaage)!
<a href="https://gitlab.utc.fr/picasoft/projets/services/castopod" target="_blank" rel="noopener noreferrer" class="inline-flex items-center px-4 py-2 mx-auto font-semibold text-center text-white rounded-md shadow gap-x-1 bg-[#1282d7] hover:no-underline hover:bg-[#0f6eb5]">Install
with
Docker<svg viewBox="0 0 24 24" width="1em" height="1em" class="text-xl text-pine-200"><path fill="currentColor" d="m16.172 11-5.364-5.364 1.414-1.414L20 12l-7.778 7.778-1.414-1.414L16.172 13H4v-2z"></path></svg></a>
::: info Note
Given high demand for docker, we plan on maintaining an official Castopod Docker
image directly into the Castopod repository.
:::

View File

@ -0,0 +1,130 @@
---
title: Official Docker images
sidebarDepth: 3
---
# Official Docker images
Castopod pushes 2 Docker images to the Docker Hub during its automated build
process:
- [**`castopod/app`**](https://hub.docker.com/r/castopod/app): the app bundle
with all of Castopod dependencies
- [**`castopod/web-server`**](https://hub.docker.com/r/castopod/web-server): an
Nginx configuration for Castopod
## Supported tags
- `develop` [unstable], latest development branch build
// stable tags to come…
## Example usage
1. Install [docker](https://docs.docker.com/get-docker/) and
[docker-compose](https://docs.docker.com/compose/install/)
2. Create a `docker-compose.yml` file with the following:
```yml
version: "3.7"
services:
app:
image: castopod/app:develop
container_name: "castopod-app"
volumes:
- castopod-media:/opt/castopod/public/media
environment:
MYSQL_DATABASE: castopod
MYSQL_USER: castopod
MYSQL_PASSWORD: changeme
CP_BASEURL: "http://castopod.example.com"
CP_ANALYTICS_SALT: changeme
CP_CACHE_HANDLER: redis
CP_REDIS_HOST: redis
networks:
- castopod-app
- castopod-db
restart: unless-stopped
web-server:
image: castopod/web-server:develop
container_name: "castopod-web-server"
volumes:
- castopod-media:/var/www/html/media
networks:
- castopod-app
ports:
- 8080:80
restart: unless-stopped
mariadb:
image: mariadb:10.5
container_name: "castopod-mariadb"
networks:
- castopod-db
volumes:
- castopod-db:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: changeme
MYSQL_DATABASE: castopod
MYSQL_USER: castopod
MYSQL_PASSWORD: changeme
restart: unless-stopped
redis:
image: redis:7.0-alpine
container_name: "castopod-redis"
ports:
- 6379:6379
volumes:
- castopod-cache:/data
networks:
- castopod-app
volumes:
castopod-media:
castopod-db:
castopod-cache:
networks:
castopod-app:
castopod-db:
```
3. Setup a reverse proxy for TLS (SSL/HTTPS), using caddy for example:
// TODO
4. Run `docker-compose up`, wait for it to initialize and head on to
`https://castopod.example.com/cp-install` to finish the setting up Castopod!
5. You're all set, start podcasting! 🎙️🚀
## Environment Variables
- **castopod/app**
| Variable name | Type (`default`) |
| -------------------------- | ----------------------------------- |
| **`CP_BASEURL`** | string (`undefined`) |
| **`CP_MEDIA_BASEURL`** | ?string (`(empty)`) |
| **`CP_ADMIN_GATEWAY`** | ?string (`"cp-admin"`) |
| **`CP_AUTH_GATEWAY`** | ?string (`"cp-auth"`) |
| **`CP_ANALYTICS_SALT`** | string (`undefined`) |
| **`CP_DATABASE_HOSTNAME`** | ?string (`"mariadb"`) |
| **`CP_DATABASE_NAME`** | string (`MYSQL_DATABASE`) |
| **`CP_DATABASE_USERNAME`** | string (`MYSQL_USER`) |
| **`CP_DATABASE_PASSWORD`** | string (`MYSQL_PASSWORD`) |
| **`CP_DATABASE_PREFIX`** | ?string (`"cp_"`) |
| **`CP_CACHE_HANDLER`** | ?[`"file"` or `"redis"`] (`"file"`) |
| **`CP_REDIS_HOST`** | ?string (`"localhost"`) |
| **`CP_REDIS_PASSWORD`** | ?string (`null`) |
| **`CP_REDIS_PORT`** | ?number (`6379`) |
| **`CP_REDIS_DATABASE`** | ?number (`0`) |
- **castopod/web-server**
| Variable name | Type (`default`) |
| --------------------- | ---------------- |
| **`CP_APP_HOSTNAME`** | ?string (`app`) |

View File

@ -0,0 +1,130 @@
---
title: Official Docker images
sidebarDepth: 3
---
# Official Docker images
Castopod pushes 2 Docker images to the Docker Hub during its automated build
process:
- [**`castopod/app`**](https://hub.docker.com/r/castopod/app): the app bundle
with all of Castopod dependencies
- [**`castopod/web-server`**](https://hub.docker.com/r/castopod/web-server): an
Nginx configuration for Castopod
## Supported tags
- `develop` [unstable], latest development branch build
// stable tags to come…
## Example usage
1. Install [docker](https://docs.docker.com/get-docker/) and
[docker-compose](https://docs.docker.com/compose/install/)
2. Create a `docker-compose.yml` file with the following:
```yml
version: "3.7"
services:
app:
image: castopod/app:develop
container_name: "castopod-app"
volumes:
- castopod-media:/opt/castopod/public/media
environment:
MYSQL_DATABASE: castopod
MYSQL_USER: castopod
MYSQL_PASSWORD: changeme
CP_BASEURL: "http://castopod.example.com"
CP_ANALYTICS_SALT: changeme
CP_CACHE_HANDLER: redis
CP_REDIS_HOST: redis
networks:
- castopod-app
- castopod-db
restart: unless-stopped
web-server:
image: castopod/web-server:develop
container_name: "castopod-web-server"
volumes:
- castopod-media:/var/www/html/media
networks:
- castopod-app
ports:
- 8080:80
restart: unless-stopped
mariadb:
image: mariadb:10.5
container_name: "castopod-mariadb"
networks:
- castopod-db
volumes:
- castopod-db:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: changeme
MYSQL_DATABASE: castopod
MYSQL_USER: castopod
MYSQL_PASSWORD: changeme
restart: unless-stopped
redis:
image: redis:7.0-alpine
container_name: "castopod-redis"
ports:
- 6379:6379
volumes:
- castopod-cache:/data
networks:
- castopod-app
volumes:
castopod-media:
castopod-db:
castopod-cache:
networks:
castopod-app:
castopod-db:
```
3. Setup a reverse proxy for TLS (SSL/HTTPS), using caddy for example:
// TODO
4. Run `docker-compose up`, wait for it to initialize and head on to
`https://castopod.example.com/cp-install` to finish the setting up Castopod!
5. You're all set, start podcasting! 🎙️🚀
## Environment Variables
- **castopod/app**
| Variable name | Type (`default`) |
| -------------------------- | ----------------------------------- |
| **`CP_BASEURL`** | string (`undefined`) |
| **`CP_MEDIA_BASEURL`** | ?string (`(empty)`) |
| **`CP_ADMIN_GATEWAY`** | ?string (`"cp-admin"`) |
| **`CP_AUTH_GATEWAY`** | ?string (`"cp-auth"`) |
| **`CP_ANALYTICS_SALT`** | string (`undefined`) |
| **`CP_DATABASE_HOSTNAME`** | ?string (`"mariadb"`) |
| **`CP_DATABASE_NAME`** | string (`MYSQL_DATABASE`) |
| **`CP_DATABASE_USERNAME`** | string (`MYSQL_USER`) |
| **`CP_DATABASE_PASSWORD`** | string (`MYSQL_PASSWORD`) |
| **`CP_DATABASE_PREFIX`** | ?string (`"cp_"`) |
| **`CP_CACHE_HANDLER`** | ?[`"file"` or `"redis"`] (`"file"`) |
| **`CP_REDIS_HOST`** | ?string (`"localhost"`) |
| **`CP_REDIS_PASSWORD`** | ?string (`null`) |
| **`CP_REDIS_PORT`** | ?number (`6379`) |
| **`CP_REDIS_DATABASE`** | ?number (`0`) |
- **castopod/web-server**
| Variable name | Type (`default`) |
| --------------------- | ---------------- |
| **`CP_APP_HOSTNAME`** | ?string (`app`) |