infrastructure/ansible/roles/website/files/docker-compose.yml
Jake Howard 4c443d67d1
Move website to gitlab.com
This means I can shut down my GitLab, without having to rewrite the CI quite yet
2023-03-30 22:43:14 +01:00

74 lines
1.6 KiB
YAML

version: "2.3"
x-website: &website
image: registry.gitlab.com/realorangeone/website:latest
user: "{{ docker_user.id }}"
restart: unless-stopped
init: true
environment:
- TZ={{ timezone }}
- DEBUG=false
- SECRET_KEY={{ website_secret_key }}
- DATABASE_URL=postgres://website:website@db/website?conn_max_age=600
- CACHE_URL=redis://redis/0
- QUEUE_STORE_URL=redis://redis/1
- RENDITION_CACHE_URL=redis://redis/2
- SPOTIFY_PROXY_HOST={{ spotify_proxy_host }}
- UNSPLASH_CLIENT_ID={{ unsplash_client_id }}
- SENTRY_DSN={{ website_sentry_dsn }}
- BASE_HOSTNAME=theorangeone.net
- WEB_CONCURRENCY=3
- SEO_INDEX=true
- ACTIVITYPUB_HOST=mastodon.theorangeone.net
volumes:
- ./media:/app/media
tmpfs:
- /tmp
depends_on:
- db
- redis
services:
nginx:
<<: *website
user: root
command: /app/etc/entrypoints/nginx
labels:
- traefik.enable=true
- traefik.http.routers.website.rule=Host(`theorangeone.net`) || Host(`jakehoward.tech`)
networks:
- default
- traefik
depends_on:
- django
worker:
<<: *website
command: /app/etc/entrypoints/worker
cron:
<<: *website
command: /app/etc/entrypoints/cron
django:
<<: *website
command: /app/etc/entrypoints/web
db:
image: postgres:14-alpine
restart: unless-stopped
volumes:
- ./postgres:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=website
- POSTGRES_USER=website
redis:
image: redis:7-alpine
restart: unless-stopped
volumes:
- ./redis:/data
networks:
traefik:
external: true