Update website deployment to unify containers
All checks were successful
/ terraform (push) Successful in 1m9s
/ ansible (push) Successful in 2m17s

This commit is contained in:
Jake Howard 2024-01-14 14:22:19 +00:00
parent ac166c3874
commit 9d685d85aa
Signed by: jake
GPG key ID: 57AFB45680EDD477
2 changed files with 24 additions and 49 deletions

View file

@ -1,10 +1,10 @@
version: "2.3"
x-website: &website
services:
website:
image: registry.gitlab.com/realorangeone/website:latest
user: "{{ docker_user.id }}"
restart: unless-stopped
init: true
environment:
- TZ={{ timezone }}
- DEBUG=false
@ -22,37 +22,12 @@ x-website: &website
- ACTIVITYPUB_HOST=mastodon.theorangeone.net
volumes:
- ./media:/app/media
- ./cache:/tmp/nginx_cache
tmpfs:
- /tmp
services:
nginx:
<<: *website
user: root
command: /app/etc/entrypoints/nginx
networks:
- default
- coredns
depends_on:
- django
worker:
<<: *website
command: /app/etc/entrypoints/worker
depends_on:
- db
- redis
cron:
<<: *website
command: /app/etc/entrypoints/cron
depends_on:
- db
- redis
django:
<<: *website
command: /app/etc/entrypoints/web
depends_on:
- db
- redis

View file

@ -28,7 +28,7 @@
become: true
vars:
server_name: theorangeone.net
upstream: website-nginx-1.docker:8000
upstream: website-website-1.docker:8000
ssl_cert_path: /etc/letsencrypt/live/theorangeone.net
location_extra: |
more_set_headers "Server: $upstream_http_server";