Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker compose deployment #3

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions docker-compose/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Docker Compose Example

This is the simplest way to get started with Takahe.

## Quick Start

1. Install [Docker](https://docs.docker.com/get-docker/) and [Docker Compose](https://docs.docker.com/compose/) on your platform
2. Copy the `docker-compose.example.yml` provider here and rename it as `docker-compose.yml`
3. Update the environment variables as described in [Takahe's documentation](https://docs.jointakahe.org/en/latest/installation/#environment-variables)
4. Run `docker compose up -d` to run everything.
66 changes: 66 additions & 0 deletions docker-compose/docker-compose.example.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
version: "3.8"

services:

db:
image: docker.io/postgres:15-alpine
healthcheck:
test: ['CMD', 'pg_isready', '-U', 'postgres']
volumes:
- db_data:/var/lib/postgresql/data
restart: always
environment:
POSTGRES_DB: takahe
POSTGRES_USER: postgres
POSTGRES_PASSWORD: change_me_to_an_actual_password
ports:
- "5433:5432"

web:
image: jointakahe/takahe:latest
environment:
TAKAHE_DATABASE_SERVER: "postgres://postgres:change_me_to_an_actual_password@db/takahe"
TAKAHE_SECRET_KEY: "a_random_secret"
TAKAHE_EMAIL_SERVER: ""
TAKAHE_EMAIL_FROM: "[email protected]"
TAKAHE_AUTO_ADMIN_EMAIL: "[email protected]"
TAKAHE_MEDIA_BACKEND: "local://"
TAKAHE_MAIN_DOMAIN: ""
TAKAHE_STATOR_TOKEN: "another_random_secret"
restart: always
depends_on:
- db
volumes:
- media_data:/takahe_media/
healthcheck:
test: ["CMD", "nc", "-z", "-v", "localhost", "8000"]
interval: 20s
timeout: 60s
start_period: 15s
ports:
- "8000:8000"

stator:
image: jointakahe/takahe:latest
environment:
TAKAHE_DATABASE_SERVER: "postgres://postgres:change_me_to_an_actual_password@db/takahe"
TAKAHE_SECRET_KEY: "a_random_secret"
TAKAHE_EMAIL_SERVER: ""
TAKAHE_EMAIL_FROM: "[email protected]"
TAKAHE_AUTO_ADMIN_EMAIL: "[email protected]"
TAKAHE_MEDIA_BACKEND: "local://"
TAKAHE_MAIN_DOMAIN: ""
TAKAHE_STATOR_TOKEN: "another_random_secret"
restart: always
depends_on:
- db
volumes:
- media_data:/takahe_media/
command: ["/takahe/manage.py", "runstator"]

networks:
default:

volumes:
db_data:
media_data: