Update website deployment to unify containers
This commit is contained in:
parent
ac166c3874
commit
9d685d85aa
2 changed files with 24 additions and 49 deletions
|
@ -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
|
||||
|
|
|
@ -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";
|
||||
|
|
Loading…
Reference in a new issue