-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* added description to the video url field in project creation form issue #50 (#61) * new deployment changes (#62) * domain setup step 1 test 5 * domain setup step 2(backend) test 1 * domain setup step2(backend) test2 * removed .ssl-data from .dockerignore * added custom nginx container to handle reverse proxying and https requests * made important changes to deploy_frontend.sh, added google tracking code to index.html, enabled crawling * increased pagination limit from 6 to 20 (#63) * phase2 patial ----- 2 (#65) switched handling of ssl back to valian/docker-nginx-auto-ssl * fixed bug that occurs when user submit google drive video link (#72) * added functionality to format youtube video url to embedable format * made video url optional * switched image upload location from cloudinary to digital ocean spaces * added functionality to automatically delete image from digitalocean space once image is deleted from db * added image count indicator and made video optional. also added project create button to navbar * removed .ssl from git * untracked .ssl-data * added support for various forms of youtube video url, vimeo and google drive * fixed issues #35, #33, #32, #30, #29 * fixed issue #46 * phase2 patial ----- 2 (#66) * added description to the video url field in project creation form issue #50 (#61) * new deployment changes (#62) * increased pagination limit from 6 to 20 (#63) * phase2 patial ----- 2 (#65) switched handling of ssl back to valian/docker-nginx-auto-ssl * fixed issue #68 * separated docker-compose files into dev and prod in preparation for CI/CD (#75) * domain setup step 1 test 5 * domain setup step 2(backend) test 1 * domain setup step2(backend) test2 * removed .ssl-data from .dockerignore * added custom nginx container to handle reverse proxying and https requests * made important changes to deploy_frontend.sh, added google tracking code to index.html, enabled crawling * switched handling of ssl back to valian/docker-nginx-auto-ssl * phase2 patial ----- 2 (#66) * added description to the video url field in project creation form issue #50 (#61) * new deployment changes (#62) * increased pagination limit from 6 to 20 (#63) * phase2 patial ----- 2 (#65) switched handling of ssl back to valian/docker-nginx-auto-ssl * phase 2 partial ------ 3 (#73) * added description to the video url field in project creation form issue #50 (#61) * new deployment changes (#62) * domain setup step 1 test 5 * domain setup step 2(backend) test 1 * domain setup step2(backend) test2 * removed .ssl-data from .dockerignore * added custom nginx container to handle reverse proxying and https requests * made important changes to deploy_frontend.sh, added google tracking code to index.html, enabled crawling * increased pagination limit from 6 to 20 (#63) * phase2 patial ----- 2 (#65) switched handling of ssl back to valian/docker-nginx-auto-ssl * fixed bug that occurs when user submit google drive video link (#72) * added functionality to format youtube video url to embedable format * made video url optional * switched image upload location from cloudinary to digital ocean spaces * added functionality to automatically delete image from digitalocean space once image is deleted from db * added image count indicator and made video optional. also added project create button to navbar * removed .ssl from git * untracked .ssl-data * added support for various forms of youtube video url, vimeo and google drive * fixed issues #35, #33, #32, #30, #29 * fixed issue #46 * phase2 patial ----- 2 (#66) * added description to the video url field in project creation form issue #50 (#61) * new deployment changes (#62) * increased pagination limit from 6 to 20 (#63) * phase2 patial ----- 2 (#65) switched handling of ssl back to valian/docker-nginx-auto-ssl * fixed issue #68 * separated docker-compose files into dev and prod in preparation for CI/CD * separated docker-compose files into dev and prod in preparation for CI/CD -- backend * separated docker-compose files into dev and prod in preparation for CI/CD --- patch (#77) * domain setup step 1 test 5 * domain setup step 2(backend) test 1 * domain setup step2(backend) test2 * removed .ssl-data from .dockerignore * added custom nginx container to handle reverse proxying and https requests * made important changes to deploy_frontend.sh, added google tracking code to index.html, enabled crawling * switched handling of ssl back to valian/docker-nginx-auto-ssl * separated docker-compose files into dev and prod in preparation for CI/CD * separated docker-compose files into dev and prod in preparation for CI/CD -- backend * separated docker-compose files into dev and prod in preparation for CI/CD --- patch * made deploy_frontend.sh more explanatory * Code Refactor (#67) * phase2 patial ----- 2 (#66) * added description to the video url field in project creation form issue #50 (#61) * new deployment changes (#62) * increased pagination limit from 6 to 20 (#63) * phase2 patial ----- 2 (#65) switched handling of ssl back to valian/docker-nginx-auto-ssl * Issue #54: switched from class based views to function based views, moved styles to seprate files and changed the general structure of the project to be more intuitive * more refactoring * more refactor -- added new prettier rules and prettified more files not being covered by prettier initially
- Loading branch information
1 parent
70d7432
commit e27329f
Showing
88 changed files
with
7,308 additions
and
6,919 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
version: "3.3" | ||
|
||
services: | ||
web: | ||
env_file: .env | ||
build: | ||
context: . | ||
dockerfile: ./Dockerfile | ||
command: /start | ||
restart: on-failure | ||
environment: | ||
- ENVIRONMENT=${ENVIRONMENT} | ||
- SECRET_KEY:${SECRET_KEY} | ||
- DEBUG:${DEBUG} | ||
- POSTGRES_NAME=${POSTGRES_NAME} | ||
- POSTGRES_USER=${POSTGRES_USER} | ||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD} | ||
- POSTGRES_HOST=${POSTGRES_HOST} | ||
- SENDGRID_API_KEY=${SENDGRID_API_KEY} | ||
volumes: | ||
- .:/zubhub_backend | ||
ports: | ||
- 8000 | ||
depends_on: | ||
- db | ||
- rabbitmq | ||
|
||
db: | ||
env_file: .env | ||
image: postgres:11 | ||
restart: on-failure | ||
environment: | ||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD} | ||
volumes: | ||
- postgres_data:/var/lib/postgresql/data/ | ||
ports: | ||
- 5432 | ||
|
||
reverse-proxy: | ||
image: valian/docker-nginx-auto-ssl:1.0.0 | ||
container_name: reverse-proxy | ||
restart: on-failure | ||
ports: | ||
- 80:80 | ||
- 443:443 | ||
volumes: | ||
- ./.ssl-data:/etc/resty-auto-ssl | ||
environment: | ||
ALLOWED_DOMAINS: "(api|www.api|rabbitmq|flower|prometheus).zubhub.unstructured.studio" | ||
SITES: | ||
"api.zubhub.unstructured.studio=web:8000;www.api.zubhub.unstructured.studio=web:8000;\ | ||
rabbitmq.zubhub.unstructured.studio=rabbitmq:15672;flower.zubhub.unstructured.studio=flower:5555;\ | ||
prometheus.zubhub.unstructured.studio=prometheus:9090" | ||
FORCE_HTTPS: "true" | ||
depends_on: | ||
- web | ||
- rabbitmq | ||
- flower | ||
- prometheus | ||
|
||
rabbitmq: | ||
env_file: .env | ||
image: rabbitmq:3-management | ||
restart: on-failure | ||
ports: | ||
- 5672 | ||
- 15672 | ||
|
||
celery_worker: | ||
env_file: .env | ||
build: | ||
context: . | ||
dockerfile: ./Dockerfile | ||
image: zubhub_celery_worker | ||
command: /start-celeryworker | ||
restart: on-failure | ||
volumes: | ||
- .:/zubhub_backend | ||
depends_on: | ||
- rabbitmq | ||
- db | ||
|
||
flower: | ||
env_file: .env | ||
build: | ||
context: . | ||
dockerfile: ./Dockerfile | ||
image: zubhub_celery_flower | ||
ports: | ||
- 5555 | ||
command: /start-flower | ||
restart: on-failure | ||
volumes: | ||
- .:/zubhub_backend | ||
depends_on: | ||
- celery_worker | ||
- rabbitmq | ||
- db | ||
|
||
prometheus: | ||
image: prom/prometheus | ||
ports: | ||
- 9090 | ||
command: | ||
- --config.file=/etc/prometheus/prometheus.yml | ||
restart: on-failure | ||
volumes: | ||
- ./prometheus.yml:/etc/prometheus/prometheus.yml:ro | ||
depends_on: | ||
- cadvisor | ||
|
||
cadvisor: | ||
image: google/cadvisor | ||
container_name: cadvisor | ||
restart: on-failure | ||
volumes: | ||
- /:/rootfs:ro | ||
- /var/run:/var/run:rw | ||
- /sys:/sys:ro | ||
- /var/lib/docker/:/var/lib/docker:ro | ||
|
||
volumes: | ||
postgres_data: | ||
.ssl-data: |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
printWidth: 80 | ||
tabWidth: 2 | ||
useTabs: false | ||
semi: true | ||
singleQuote: true | ||
trailingComma: all | ||
bracketSpacing: true | ||
jsxBracketSameLine: false | ||
arrowParens: avoid | ||
requirePragma: false |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# build environment | ||
FROM node:13.12.0-alpine as build | ||
WORKDIR /zubhub_frontend | ||
ENV PATH /zubhub_frontend/node_modules/.bin:$PATH | ||
COPY package.json ./ | ||
COPY package-lock.json ./ | ||
RUN npm ci --silent | ||
RUN npm install react-scripts@3.4.1 -g --silent | ||
COPY . ./ | ||
RUN npm run build | ||
|
||
# production environment | ||
FROM nginx:stable-alpine | ||
COPY --from=build /zubhub_frontend/build /usr/share/nginx/html | ||
# new | ||
COPY nginx/prod/default.conf /etc/nginx/conf.d/default.conf | ||
EXPOSE 80 | ||
CMD ["nginx", "-g", "daemon off;"] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,23 @@ | ||
#! /bin/bash | ||
|
||
echo "copying .env file and ssl folder" | ||
mv zubhub_frontend/zubhub/.env zubhub/zubhub_frontend/zubhub/.env | ||
mv zubhub_frontend/zubhub/.ssl-data zubhub/zubhub_frontend/zubhub/ | ||
echo "done copying .env file and ssl folder" | ||
|
||
echo "removing unneccessary files and folders" | ||
rm -rf zubhub_frontend | ||
cp -r zubhub/zubhub_frontend/ zubhub_frontend/ | ||
rm -rf zubhub/ zubhub_frontend/zubhub/.env.example | ||
rm -rf zubhub/ zubhub_frontend/zubhub/Dockerfile | ||
rm -rf zubhub/ zubhub_frontend/zubhub/docker-compose.yml | ||
rm -rf zubhub/ zubhub_frontend/zubhub/nginx/dev | ||
echo "done removing unneccessary files and folders" | ||
|
||
cd zubhub_frontend/zubhub/ | ||
|
||
echo "stopping and rebuilding the containers" | ||
docker-compose down | ||
docker-compose up -d --build | ||
docker-compose -f ./docker-compose.prod.yml up -d --build | ||
echo "Updated frontend" | ||
# EOT |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
version: "3.3" | ||
|
||
services: | ||
zubhub_frontend: | ||
container_name: zubhub_frontend | ||
build: | ||
context: . | ||
dockerfile: Dockerfile.prod | ||
volumes: | ||
- ./nginx/prod/default.conf:/etc/nginx/conf.d/default.conf | ||
restart: on-failure | ||
ports: | ||
- "80" | ||
|
||
reverse-proxy: | ||
image: valian/docker-nginx-auto-ssl:1.0.0 | ||
container_name: reverse-proxy | ||
restart: on-failure | ||
ports: | ||
- 80:80 | ||
- 443:443 | ||
volumes: | ||
- ./.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: |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
map $sent_http_content_type $expires { | ||
default off; | ||
text/html epoch; | ||
text/css max; | ||
application/javascript max; | ||
~image/ max; | ||
} | ||
server { | ||
listen 3000; | ||
server_name localhost; | ||
|
||
gzip on; | ||
gzip_min_length 1000; | ||
gzip_buffers 4 32k; | ||
gzip_proxied any; | ||
gzip_types text/plain application/javascript application/x-javascript text/javascript text/xml text/css; | ||
gzip_vary on; | ||
gzip_disable “MSIE [1–6]\.(?!.*SV1)”; | ||
access_log /var/log/nginx/access.log; | ||
error_log /var/log/nginx/error.log; | ||
|
||
location / { | ||
root /usr/share/nginx/html; | ||
index index.html index.htm; | ||
try_files $uri $uri/ /index.html; | ||
} | ||
|
||
error_page 500 502 503 504 /50x.html; | ||
|
||
location = /50x.html { | ||
root /usr/share/nginx/html; | ||
} | ||
} |
File renamed without changes.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.