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"
|
version: "2.3"
|
||||||
|
|
||||||
x-website: &website
|
|
||||||
|
services:
|
||||||
|
website:
|
||||||
image: registry.gitlab.com/realorangeone/website:latest
|
image: registry.gitlab.com/realorangeone/website:latest
|
||||||
user: "{{ docker_user.id }}"
|
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
init: true
|
|
||||||
environment:
|
environment:
|
||||||
- TZ={{ timezone }}
|
- TZ={{ timezone }}
|
||||||
- DEBUG=false
|
- DEBUG=false
|
||||||
|
@ -22,37 +22,12 @@ x-website: &website
|
||||||
- ACTIVITYPUB_HOST=mastodon.theorangeone.net
|
- ACTIVITYPUB_HOST=mastodon.theorangeone.net
|
||||||
volumes:
|
volumes:
|
||||||
- ./media:/app/media
|
- ./media:/app/media
|
||||||
|
- ./cache:/tmp/nginx_cache
|
||||||
tmpfs:
|
tmpfs:
|
||||||
- /tmp
|
- /tmp
|
||||||
|
|
||||||
services:
|
|
||||||
nginx:
|
|
||||||
<<: *website
|
|
||||||
user: root
|
|
||||||
command: /app/etc/entrypoints/nginx
|
|
||||||
networks:
|
networks:
|
||||||
- default
|
- default
|
||||||
- coredns
|
- 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:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
- redis
|
- redis
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
become: true
|
become: true
|
||||||
vars:
|
vars:
|
||||||
server_name: theorangeone.net
|
server_name: theorangeone.net
|
||||||
upstream: website-nginx-1.docker:8000
|
upstream: website-website-1.docker:8000
|
||||||
ssl_cert_path: /etc/letsencrypt/live/theorangeone.net
|
ssl_cert_path: /etc/letsencrypt/live/theorangeone.net
|
||||||
location_extra: |
|
location_extra: |
|
||||||
more_set_headers "Server: $upstream_http_server";
|
more_set_headers "Server: $upstream_http_server";
|
||||||
|
|
Loading…
Reference in a new issue