Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

phase 2 partial ------ 3 #73

Merged
merged 6 commits into from
Jan 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions zubhub_backend/zubhub/projects/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ def save(self, *args, **kwargs):
self.video = "player.vimeo.com/video".join(
self.video.split("vimeo.com"))

elif self.video.find("drive.google.com") != -1 and self.video.find("view") != -1:
self.video = self.video.split("view")[0] + "preview"
elif self.video.find("drive.google.com") != -1 and self.video.find("/view") != -1:
self.video = self.video.split("/view")[0] + "/preview"

if self.id:
self.likes_count = self.likes.count()
Expand Down
2 changes: 1 addition & 1 deletion zubhub_frontend/zubhub/deploy_frontend.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#! /bin/bash

mv zubhub_frontend/zubhub/.env zubhub/zubhub_frontend/zubhub/.env
mv zubhub_frontend/zubhub/.zero-ssl zubhub/zubhub_frontend/zubhub/
mv zubhub_frontend/zubhub/.ssl-data zubhub/zubhub_frontend/zubhub/
rm -rf zubhub_frontend
cp -r zubhub/zubhub_frontend/ zubhub_frontend/
rm -rf zubhub/ zubhub_frontend/zubhub/.env.example
Expand Down
12 changes: 9 additions & 3 deletions zubhub_frontend/zubhub/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,20 @@ services:
- "8080:80"

reverse-proxy:
image: nginx:stable-alpine
image: valian/docker-nginx-auto-ssl:1.0.0
container_name: reverse-proxy
restart: on-failure
ports:
- 80:80
- 443:443
volumes:
- ./.zero-ssl:/etc/ssl
- ./reverse-proxy:/etc/nginx
- ./.ssl-data:/etc/resty-auto-ssl
environment:
ALLOWED_DOMAINS: "(zubhub|www.zubhub).unstructured.studio"
SITES: "zubhub.unstructured.studio=zubhub_frontend;www.zubhub.unstructured.studio=zubhub_frontend"
FORCE_HTTPS: "true"
depends_on:
- zubhub_frontend

volumes:
.ssl-data: