Browse Source

💚 fix and reduce code

main
verzelea 6 years ago
parent
commit
a1d94bb229
  1. 12
      .circleci/config.yml
  2. 4
      conduit/settings.py
  3. 2
      requirements/prod.txt

12
.circleci/config.yml

@ -31,13 +31,13 @@ jobs:
test:
docker:
- image: circleci/python:3.7.9-stretch-browsers
- 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" }}
key: deps-{{ checksum "requirements/dev.txt"}}-{{ .Environment.CACHE_VERSION }}
- run:
name: Wait for postgres
command: dockerize -wait tcp://localhost:5432 -timeout 1m
name: Waiting for postgres
command : dockerize -wait tcp://localhost:5432 -timeout 1m
- run:
name: running test
command: |

4
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'

2
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

Loading…
Cancel
Save