Created
April 10, 2017 20:03
-
-
Save telent/e0f010ea1bfdcb95b921980ea9cccd42 to your computer and use it in GitHub Desktop.
mastdon with https in docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/docker-compose.yml b/docker-compose.yml | |
index d6ba66d..11a3f73 100644 | |
--- a/docker-compose.yml | |
+++ b/docker-compose.yml | |
@@ -3,6 +3,8 @@ services: | |
db: | |
restart: always | |
image: postgres:alpine | |
+ volumes: | |
+ - ./data/pgdata:/var/lib/postgresql/data | |
redis: | |
restart: always | |
image: redis:alpine | |
@@ -19,6 +21,20 @@ services: | |
volumes: | |
- ./public/assets:/mastodon/public/assets | |
- ./public/system:/mastodon/public/system | |
+ nginx: | |
+ image: telent/letsencruft:latest | |
+ ports: | |
+ - "80:80" | |
+ - "443:443" | |
+ environment: | |
+ - APP_URL=http://web:3000 | |
+ - EMAIL=dan@telent.net | |
+ - DOMAIN=toot.telent.net | |
+ volumes: | |
+ - ./nginx/nginx.mastodon.site.conf.template:/etc/nginx/site-templates/mastodon.site.conf.template | |
+ - ./data/letsencrypt/wks:/var/lib/letsencrypt/.well-known | |
+ - ./data/letsencrypt/etc:/etc/letsencrypt | |
+ command: /bin/sh /sbin/rc | |
streaming: | |
restart: always | |
build: . | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 443 default ssl; | |
listen [::]:443 default ssl; | |
server_name %{DOMAIN}; | |
ssl_certificate /etc/ssl/%{DOMAIN}.crt; | |
ssl_certificate_key /etc/ssl/%{DOMAIN}.key; | |
location / { | |
proxy_pass http://web:3000; | |
} | |
location /api/v1/streaming { | |
proxy_pass http://streaming:4000; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment