Update website hosting for it being fronted by nginx

This commit is contained in:
Jake Howard 2023-02-22 10:41:39 +00:00
parent a6d0a36dac
commit 1764b66d2f
Signed by: jake
GPG key ID: 57AFB45680EDD477

View file

@ -17,7 +17,7 @@ x-website: &website
- UNSPLASH_CLIENT_ID={{ unsplash_client_id }} - UNSPLASH_CLIENT_ID={{ unsplash_client_id }}
- SENTRY_DSN={{ website_sentry_dsn }} - SENTRY_DSN={{ website_sentry_dsn }}
- BASE_HOSTNAME=theorangeone.net - BASE_HOSTNAME=theorangeone.net
- WEB_CONCURRENCY=4 - WEB_CONCURRENCY=3
- SEO_INDEX=true - SEO_INDEX=true
- ACTIVITYPUB_HOST=mastodon.theorangeone.net - ACTIVITYPUB_HOST=mastodon.theorangeone.net
volumes: volumes:
@ -29,22 +29,30 @@ x-website: &website
- redis - redis
services: services:
website: nginx:
<<: *website <<: *website
user: root
command: /app/etc/entrypoints/nginx
labels: labels:
- traefik.enable=true - traefik.enable=true
- traefik.http.routers.website.rule=Host(`theorangeone.net`) || Host(`jakehoward.tech`) - traefik.http.routers.website.rule=Host(`theorangeone.net`) || Host(`jakehoward.tech`)
networks: networks:
- default - default
- traefik - traefik
depends_on:
- django
worker: worker:
<<: *website <<: *website
command: python manage.py rqworker command: /app/etc/entrypoints/worker
cron: cron:
<<: *website <<: *website
command: supercronic etc/crontab command: /app/etc/entrypoints/cron
django:
<<: *website
command: /app/etc/entrypoints/web
db: db:
image: postgres:14-alpine image: postgres:14-alpine