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

Bump flask-cors from 3.0.4 to 3.0.8 #190

Closed
wants to merge 2 commits into from
Closed
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
18 changes: 18 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: 2
updates:
- package-ecosystem: pip
directory: "/"
schedule:
interval: weekly
day: friday
time: "18:00"
timezone: Europe/Madrid
open-pull-requests-limit: 10
- package-ecosystem: docker
directory: "/"
schedule:
interval: weekly
day: friday
time: "18:00"
timezone: Europe/Madrid
open-pull-requests-limit: 10
41 changes: 41 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Backend Deployment

on:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Build and push Frotnend image
uses: docker/build-push-action@v1
with:
username: hugo19941994
password: ${{ secrets.DOCKER_PASSWORD }}
repository: hugo19941994/moviepepper-backend
tags: latest

- name: Install doctl
uses: digitalocean/action-doctl@v2
with:
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}

- name: Save DigitalOcean kubeconfig
run: doctl kubernetes cluster kubeconfig save k8s-1-18-6-do-0-lon1-1595844489030

- name: Deploy to DigitalOcean Kubernetes
run: kubectl apply -f manifest.yaml

- name: Deploy to DigitalOcean Kubernetes
run: kubectl rollout restart deployment/moviepepper-backend

- name: Verify deployment
run: kubectl rollout status deployment/moviepepper-backend


41 changes: 41 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Backend CI

on: [pull_request]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
python-version: [3.8.x]

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Use Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
node-version: ${{ matrix.python-version }}

- name: Install pipenv
run: sudo pip install pipenv

- name: Install dependencies using Pipenv
run: pipenv install --deploy --system

- name: Download deps
run: |
python -m textblob.download_corpora
python -m nltk.downloader stopwords

- name: Test moviepepper-backend
run: |
coverage run --concurrency=multiprocessing tests.py
coverage combine
coveralls
env:
CI: true


11 changes: 0 additions & 11 deletions .travis.yml

This file was deleted.

25 changes: 25 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM python:3.8

RUN pip install pipenv

WORKDIR /app
COPY Pipfile* /app/

RUN pipenv install --system

COPY . /app/

# 1 scrape
WORKDIR /app/movie_scrape
RUN START_URL="http://www.imdb.com/search/title?groups=top_1000&sort=user_rating,desc&page=1&ref" ./scrap.sh

# 2 Calculate recommendations
WORKDIR /app
RUN python -m textblob.download_corpora
RUN python -m nltk.downloader stopwords
RUN python tfidf_lsa.py
RUN python doc2vec.py

# 3 Serve server
CMD python server.py

2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ textblob = "==0.15.3"
typing = "==3.6.4"
Brotli = "==1.0.4"
Flask = "==1.0.2"
Flask-Cors = "==3.0.4"
Flask-Cors = "==3.0.8"
Scrapy = "==1.8.0"

[requires]
Expand Down
Loading