diff --git a/docker/production/app/entrypoint.sh b/docker/production/app/entrypoint.sh index 2a1ecfa8c54861f42b0f994c18ff02b80016d501..b5b1f3edc1b0b7c0e1ca9c2fbd344ba8cdc6b4f7 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 23295bef34ef1b98e79eaafea66fc53e11d74620..c76d83352397760b890d094a28f06e6e3648331d 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 0000000000000000000000000000000000000000..53cc6dcf9cb34bb4e4db43831729329a099f8337 --- /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 0000000000000000000000000000000000000000..ec5f6f20c7c8d6457a0ffa71724af73ee3be05f7 --- /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 c63d2fe13acf3b7637f6eae2542b163729f2d007..05659d73eb1e9ae243c4de711e3b4ad2683faaf8 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 + +We've released official Docker images for Castopod! -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. +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. - -::: 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 0000000000000000000000000000000000000000..53cc6dcf9cb34bb4e4db43831729329a099f8337 --- /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 0000000000000000000000000000000000000000..53cc6dcf9cb34bb4e4db43831729329a099f8337 --- /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`) |