diff --git a/.circleci/config.yml b/.circleci/config.yml index d89ec01..e04b4b5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -30,14 +30,14 @@ jobs: git push https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_PROJECT_NAME.git main test: - docker: - - image: circleci/python:3.7.9-stretch-browsers + docker: + - image: circleci/python:3.9-buster-node-browsers environment: + DATABASE_URL: postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@localhost:5432/$POSTGRES_DB FLASK_APP: autoapp.py CONDUIT_SECRET: $CONDUIT_SECRET FLASK_DEBUG: 1 - DATABASE_URL: postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@localhost:5432/$POSTGRES_DB - - image: circleci/postgres:9.5.19-alpine + - image: circleci/postgres:9.6.2-alpine environment: POSTGRES_USER: $POSTGRES_USER POSTGRES_DB: $POSTGRES_DB @@ -45,10 +45,10 @@ jobs: steps: - checkout - restore_cache: - key: deps1-{{ .Branch }}-{{ checksum "requirements/dev.txt" }} - - run: - name: Wait for postgres - command: dockerize -wait tcp://localhost:5432 -timeout 1m + key: deps-{{ checksum "requirements/dev.txt"}}-{{ .Environment.CACHE_VERSION }} + - run: + name: Waiting for postgres + command : dockerize -wait tcp://localhost:5432 -timeout 1m - run: name: running test command: | diff --git a/conduit/settings.py b/conduit/settings.py index 5bce3a9..33bf162 100644 --- a/conduit/settings.py +++ b/conduit/settings.py @@ -27,10 +27,10 @@ class Config(object): 'http://localhost:4000', 'https://devoptpfinal.herokuapp.com/api/articles', 'https://devoptpfinal.herokuapp.com', - 'http://0.0.0.0:5432', - 'http://localhost:5432', 'http://0.0.0.0:' + os.environ.get('PORT', '8080'), 'https://0.0.0.0:' + os.environ.get('PORT', '8080'), + 'http://0.0.0.0:5432', + 'http://localhost:5432' ] JWT_HEADER_TYPE = 'Token' diff --git a/requirements/prod.txt b/requirements/prod.txt index f581e1f..19a1d8e 100644 --- a/requirements/prod.txt +++ b/requirements/prod.txt @@ -1,7 +1,7 @@ # Everything needed in production Werkzeug -SQLAlchemy==1.3.0 +SQLAlchemy==1.1.9 Flask_Caching Flask_SQLAlchemy==2.2 click