-
-
Save manfre/76f2b3304e87c59931a10b24a64e9072 to your computer and use it in GitHub Desktop.
Takahe portainer docker compose
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.7" | |
x-takahe-common: | |
&takahe-common | |
image: manfre/takahe-dev:emoji | |
volumes: | |
- $PWD/.env:/takahe/.env | |
networks: | |
- web | |
- dbnet | |
depends_on: | |
- db | |
environment: | |
- "TAKAHE_CACHES_DEFAULT=pymemcache://memcache:11211" | |
services: | |
db: | |
container_name: takahe-db | |
image: docker.io/postgres:15-alpine | |
healthcheck: | |
test: ['CMD', 'pg_isready', '-U', 'postgres'] | |
volumes: | |
- $PWD/pgdata:/var/lib/postgresql/data | |
networks: | |
- dbnet | |
restart: always | |
environment: | |
- POSTGRES_USER=$PGUSER | |
- POSTGRES_PASSWORD=$PGPASSWORD | |
- POSTGRES_DB=$PGDATABASE | |
memcache: | |
container_name: takahe-cache | |
image: memcached:1.6-alpine | |
networks: | |
- dbnet | |
restart: always | |
expose: | |
- "11211" | |
web: | |
<<: *takahe-common | |
container_name: takahe-web | |
restart: always | |
expose: | |
- "8000" | |
stator: | |
<<: *takahe-common | |
container_name: takahe-stator | |
restart: always | |
command: ["/takahe/manage.py", "runstator"] | |
setup: | |
<<: *takahe-common | |
container_name: takahe-setup | |
networks: | |
- dbnet | |
restart: on-failure | |
command: ["/takahe/manage.py", "migrate"] | |
collectstatic: | |
<<: *takahe-common | |
container_name: takahe-collectstatic | |
command: ["/takahe/manage.py", "collectstatic", "--no-input"] | |
volumes: | |
- $PWD/static-collected:/takahe/static-collected | |
- $PWD/.env:/takahe/.env | |
networks: | |
- dbnet | |
restart: on-failure | |
networks: | |
dbnet: | |
internal: true | |
web: | |
name: caddy_web | |
external: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment