diff --git a/docker/production/app/entrypoint.sh b/docker/production/app/entrypoint.sh index 2a1ecfa8..b5b1f3ed 100644 --- a/docker/production/app/entrypoint.sh +++ b/docker/production/app/entrypoint.sh @@ -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 diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index 23295bef..c76d8335 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -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" }, ], diff --git a/docs/src/fr/getting-started/docker.md b/docs/src/fr/getting-started/docker.md new file mode 100644 index 00000000..53cc6dcf --- /dev/null +++ b/docs/src/fr/getting-started/docker.md @@ -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`) | diff --git a/docs/src/getting-started/docker.md b/docs/src/getting-started/docker.md new file mode 100644 index 00000000..ec5f6f20 --- /dev/null +++ b/docs/src/getting-started/docker.md @@ -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"`) | diff --git a/docs/src/getting-started/install.md b/docs/src/getting-started/install.md index c63d2fe1..05659d73 100644 --- a/docs/src/getting-started/install.md +++ b/docs/src/getting-started/install.md @@ -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 - -### Install with Docker - -If you wish to use Docker to install Castopod, it is possible thanks to -[Romain de Laage](https://mamot.fr/@rdelaage)! - -Install -with -Docker - -::: info Note - -Given high demand for docker, we plan on maintaining an official Castopod Docker -image directly into the Castopod repository. - -::: diff --git a/docs/src/nn-NO/getting-started/docker.md b/docs/src/nn-NO/getting-started/docker.md new file mode 100644 index 00000000..53cc6dcf --- /dev/null +++ b/docs/src/nn-NO/getting-started/docker.md @@ -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`) | diff --git a/docs/src/pt-BR/getting-started/docker.md b/docs/src/pt-BR/getting-started/docker.md new file mode 100644 index 00000000..53cc6dcf --- /dev/null +++ b/docs/src/pt-BR/getting-started/docker.md @@ -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`) |