castopod/docs/src/es/getting-started/docker.md

174 lines
7.5 KiB
Markdown
Raw Normal View History

2022-08-22 17:56:51 +02:00
---
title: Imágenes oficiales de Docker
sidebarDepth: 3
---
# Imágenes oficiales de Docker
2022-11-25 18:44:19 +01:00
Castopod lanza 3 imágenes Docker al DockerHub durante su proceso de construcción
automatizada:
2022-08-22 17:56:51 +02:00
2023-03-23 13:13:46 +01:00
- [**`castopod/castopod`**](https://hub.docker.com/r/castopod/castopod): an all
in one castopod image using nginx unit
2022-09-06 16:55:46 +02:00
- [**`castopod/app`**](https://hub.docker.com/r/castopod/app): el paquete
completo de Castopod con todas las dependencias.
- [**`castopod/web-server`**](https://hub.docker.com/r/castopod/web-server): una
configuración Nginx para Castopod
2022-11-25 18:44:19 +01:00
- [**`castopod/videoclipper`**](https://hub.docker.com/r/castopod/video-clipper):
una imagen opcional de creación de videoclips gracias a ffmpeg
2022-08-22 17:56:51 +02:00
2022-09-06 16:55:46 +02:00
Adicionalmente, Castopod requiere una base de datos compatible con MySQL.
También se puede añadir una base de datos Redis como gestor de caché.
2022-08-22 17:56:51 +02:00
## Etiquetas admitidas
2022-09-06 16:55:46 +02:00
- `develop` [unstable], última rama de desarrollo construida
2022-11-25 18:44:19 +01:00
- `beta` [stable], última versión beta
- `1.0.0-beta.x` [stable], versión beta específica (desde `1.0.0-beta.22`)
- `latest` [stable], última versión
- `1.x.x` [stable], versión específica de compilación (desde `1.0.0`)
2022-08-22 17:56:51 +02:00
## Ejemplo de uso
1. Instalar [docker](https://docs.docker.com/get-docker/) y
[docker-compose](https://docs.docker.com/compose/install/)
2. Crear un archivo `docker-compose.yml` con lo siguiente:
```yml
2022-09-06 16:55:46 +02:00
version: "3.7"
2022-08-22 17:56:51 +02:00
2022-09-06 16:55:46 +02:00
services:
app:
2022-11-04 12:03:24 +01:00
image: castopod/app:latest
2022-09-06 16:55:46 +02:00
container_name: "castopod-app"
volumes:
2023-05-05 16:28:51 +02:00
- castopod-media:/var/www/castopod/public/media
2022-09-06 16:55:46 +02:00
environment:
2022-08-22 17:56:51 +02:00
MYSQL_DATABASE: castopod
MYSQL_USER: castopod
2022-09-06 16:55:46 +02:00
MYSQL_PASSWORD: changeme
2023-05-05 16:28:51 +02:00
CP_BASEURL: "https://castopod.example.com"
2022-09-06 16:55:46 +02:00
CP_ANALYTICS_SALT: changeme
2022-08-22 17:56:51 +02:00
CP_CACHE_HANDLER: redis
CP_REDIS_HOST: redis
2022-09-06 16:55:46 +02:00
networks:
2022-08-22 17:56:51 +02:00
- castopod-app
- castopod-db
2022-09-06 16:55:46 +02:00
ports:
2023-05-05 16:28:51 +02:00
- 8000:8000
2022-09-06 16:55:46 +02:00
restart: unless-stopped
2022-08-22 17:56:51 +02:00
mariadb:
2022-09-06 16:55:46 +02:00
image: mariadb:10.5
container_name: "castopod-mariadb"
networks:
2022-08-22 17:56:51 +02:00
- castopod-db
2022-09-06 16:55:46 +02:00
volumes:
2022-08-22 17:56:51 +02:00
- castopod-db:/var/lib/mysql
2022-09-06 16:55:46 +02:00
environment:
MYSQL_ROOT_PASSWORD: changeme
2022-08-22 17:56:51 +02:00
MYSQL_DATABASE: castopod
MYSQL_USER: castopod
2022-09-06 16:55:46 +02:00
MYSQL_PASSWORD: changeme
restart: unless-stopped
2022-08-22 17:56:51 +02:00
redis:
2022-09-06 16:55:46 +02:00
image: redis:7.0-alpine
container_name: "castopod-redis"
volumes:
2022-08-22 17:56:51 +02:00
- castopod-cache:/data
2022-09-06 16:55:46 +02:00
networks:
2022-08-22 17:56:51 +02:00
- castopod-app
2022-09-06 16:55:46 +02:00
volumes:
2022-08-22 17:56:51 +02:00
castopod-media:
castopod-db:
castopod-cache:
2022-09-06 16:55:46 +02:00
networks:
2022-08-22 17:56:51 +02:00
castopod-app:
castopod-db:
```
Debes adaptar algunas variables a tus necesidades (ej. `CP_BASEURL`,
2022-09-06 16:55:46 +02:00
`MYSQL_ROOT_PASSWORD`, `MYSQL_PASSWORD` y `CP_ANALYTICS_SALT`).
2022-08-22 17:56:51 +02:00
2022-09-06 16:55:46 +02:00
3. Configura un servidor proxy inverso para TLS (SSL/HTTPS).
2022-08-22 17:56:51 +02:00
2022-09-06 16:55:46 +02:00
TLS es imprescindible para que ActivityPub funcione. Este trabajo puede ser
2022-08-22 17:56:51 +02:00
fácilmente manejado por un proxy inverso, por ejemplo con
[Caddy](https://caddyserver.com/):
```
#castopod
2023-05-05 16:28:51 +02:00
castopod.example.com {
reverse_proxy localhost:8000
2022-08-22 17:56:51 +02:00
}
```
4. Ejecuta `docker-compose -d`, espera a que se inicie y ve a
2022-09-06 16:55:46 +02:00
`https://castopod.mi_dominio.com/cp-install` para terminar de configurar
2022-08-22 17:56:51 +02:00
Castopod!
2022-11-04 12:03:24 +01:00
5. Todo listo, empieza a hacer podcasting! 🎙️🚀 🎙️🚀
2022-08-22 17:56:51 +02:00
2022-09-06 16:55:46 +02:00
## Variables de Entorno
2022-08-22 17:56:51 +02:00
2022-11-04 12:03:24 +01:00
- **castopod/video-clipper**
2022-11-25 18:44:19 +01:00
| Nombre de la Variable | Tipo (`predeterminado`) | Por defecto |
2022-11-04 12:03:24 +01:00
| -------------------------- | ----------------------- | ---------------- |
| **`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_"` |
2023-05-05 16:28:51 +02:00
- **castopod/castopod** and **castopod/app**
| Nombre de la variable | Tipo (`por defecto`) | Por defecto |
| ------------------------------------- | ---------------------- | ---------------- |
| **`CP_BASEURL`** | string | `undefined` |
| **`CP_MEDIA_URLBASE`** | ?string | `CP_BASEURL` |
| **`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"` o `"redis"`] | `"file"` |
| **`CP_REDIS_HOST`** | ?string | `"localhost"` |
| **`CP_REDIS_PASSWORD`** | ?string | `null` |
| **`CP_REDIS_PORT`** | ?number | `6379` |
| **`CP_REDIS_DATABASE`** | ?number | `0` |
| **`HOST_EMAIL_SMTP_HOST`** | ?string | `undefined` |
| **`CP_EMAIL_FROM`** | ?string | `undefined` |
| **`CP_EMAIL_SMTP_USERNAME`** | ?string | `"localhost"` |
| **`CP_EMAIL_SMTP_PASSWORD`** | ?string | `null` |
| **`CP_EMAIL_SMTP_PORT`** | ?number | `25` |
| **`CP_EMAIL_SMTP_CRYPTO`** | [`"tls"` o `"ssl"`] | `"tls"` |
| **`CP_ENABLE_2FA`** | ?boolean | `undefined` |
| **`CP_MEDIA_FILE_MANAGER`** | ?string | `undefined` |
| **`CP_MEDIA_S3_ENDPOINT`** | ?string | `undefined` |
| **`CP_MEDIA_S3_KEY`** | ?string | `undefined` |
| **`CP_MEDIA_S3_SECRET`** | ?string | `undefined` |
| **`CP_MEDIA_S3_REGION`** | ?string | `undefined` |
| **`CP_MEDIA_S3_BUCKET`** | ?string | `undefined` |
| **`CP_MEDIA_S3_PROTOCOL`** | ?number | `undefined` |
| **`CP_MEDIA_S3_PATH_STYLE_ENDPOINT`** | ?boolean | `undefined` |
| **`CP_MEDIA_S3_KEY_PREFIX`** | ?string | `undefined` |
| **`CP_DISABLE_HTTPS`** | ?[`0` or `1`] | `undefined` |
| **`CP_MAX_BODY_SIZE`** | ?number (with suffix) | `512M` |
| **`CP_PHP_MEMORY_LIMIT`** | ?number (with suffix) | `512M` |
| **`CP_TIMEOUT`** | ?number | `900` |
2022-12-09 16:42:46 +01:00
- **castopod/servidor web**
2022-08-22 17:56:51 +02:00
2023-05-05 16:28:51 +02:00
| Nombre de la variable | Tipo | Por defecto |
| ---------------------- | --------------------- | ----------- |
| **`CP_APP_HOSTNAME`** | ?string | `"app"` |
| **`CP_MAX_BODY_SIZE`** | ?number (with suffix) | `512M` |
| **`CP_TIMEOUT`** | ?number | `900` |