-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
separated docker-compose files into dev and prod in preparation for C…
…I/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
- Loading branch information
1 parent
8fcdce5
commit b754415
Showing
6 changed files
with
159 additions
and
45 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
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 | ||
volumes: | ||
- ./nginx/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