Giter Site home page Giter Site logo

collinmutembei / iii Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 2.05 MB

blst - plan your life

Home Page: https://blst-api.herokuapp.com

License: MIT License

Python 46.81% HTML 32.82% JavaScript 11.13% CSS 8.43% Dockerfile 0.80%
angularjs bootstrap django drf

iii's People

Contributors

collinmutembei avatar dependabot[bot] avatar

Watchers

 avatar

iii's Issues

Connection to Postgres service fails

The postgres service defined in the docker-compose.yml file is not available from the web service. Here's the current definition.

version: '3.6'

services:
  db:
    restart: unless-stopped
    image: postgres:9.6-alpine
    volumes:
      - ./compose/db/:/docker-entrypoint-initdb.d/
    ports:
      - 5432:5432
    networks:
      - db-network

  . . .

  web:
    restart: unless-stopped
    build: .
    command: >
      sh -c "python3 manage.py migrate --no-input
      && python3 runserver 0.0.0.0:9000"
    volumes:
      - .:/BLST
    ports:
      - 9000:9000
    networks:
      - db-network

Reproduction Steps:

  1. docker-compose run web python manage.py runserver fails with an error
psycopg2.OperationalError: could not connect to server: No such file or directory
	Is the server running locally and accepting
	connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
  1. docker-compose run python manage.py test fails with similar error as 1 above

Expected behavior:

  • python manage.py runserver command should start django's web server
System check identified no issues (0 silenced).
August 12, 2018 - 21:14:05
Django version 2.1, using settings 'blst.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C
  • python manage.py test command should run unit tests
Creating test database for alias 'default' ('test_blst')...
Operations to perform:
  Synchronize unmigrated apps: messages, raven_contrib_django, rest_framework, staticfiles
  Apply all migrations: admin, api, auth, contenttypes, sessions, social_django
Synchronizing apps without migrations:
  Creating tables...
    Running deferred SQL...
Running migrations:
  Applying contenttypes.0001_initial... OK
  Applying auth.0001_initial... OK
  Applying admin.0001_initial... OK
  Applying admin.0002_logentry_remove_auto_add... OK
  Applying admin.0003_logentry_add_action_flag_choices... OK
  Applying api.0001_initial... OK
  Applying api.0002_auto_20180812_2107... OK
  Applying contenttypes.0002_remove_content_type_name... OK
  Applying auth.0002_alter_permission_name_max_length... OK
  Applying auth.0003_alter_user_email_max_length... OK
  Applying auth.0004_alter_user_username_opts... OK
  Applying auth.0005_alter_user_last_login_null... OK
  Applying auth.0006_require_contenttypes_0002... OK
  Applying auth.0007_alter_validators_add_error_messages... OK
  Applying auth.0008_alter_user_username_max_length... OK
  Applying auth.0009_alter_user_last_name_max_length... OK
  Applying sessions.0001_initial... OK
  Applying social_django.0001_initial... OK
  Applying social_django.0002_add_related_name... OK
  Applying social_django.0003_alter_email_max_length... OK
  Applying social_django.0004_auto_20160423_0400... OK
  Applying social_django.0005_auto_20160727_2333... OK
  Applying social_django.0006_partial... OK
  Applying social_django.0007_code_timestamp... OK
  Applying social_django.0008_partial_timestamp... OK
System check identified no issues (0 silenced).
test_bucketlists_api_endpoint (tests.test_api_resources.APIResourcesTestCase) ... ok
test_bucketlists_resource_requires_auth (tests.test_api_resources.APIResourcesTestCase) ... ok
test_crud_operations_on_bucketlist_when_autheticated (tests.test_api_resources.APIResourcesTestCase) ... <QuerySet [<Bucketlist: 1 - test bucketlist>]> created
ok
test_crud_operations_on_item_in_bucketlist_when_authenticated (tests.test_api_resources.APIResourcesTestCase) ... <QuerySet [<Item: 2 - test item>]> created
ok
test_get_bucketlists_when_autheticated (tests.test_api_resources.APIResourcesTestCase) ... ok
test_dashboard_view_when_not_authenticated (tests.test_views.APIViewTestCase) ... ok
test_inexistent_view (tests.test_views.APIViewTestCase) ... ok
test_landing_page_view (tests.test_views.APIViewTestCase) ... ok

----------------------------------------------------------------------
Ran 8 tests in 1.262s

OK
Destroying test database for alias 'default' ('test_blst')...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.