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

Bad Gateway #45

Open
gerroon opened this issue Mar 14, 2020 · 0 comments
Open

Bad Gateway #45

gerroon opened this issue Mar 14, 2020 · 0 comments

Comments

@gerroon
Copy link

gerroon commented Mar 14, 2020

Hi

I just build the docker image using the compose file and I am getting 502 bad gateway when I try a url..

politepol      |   Applying frontend.0003_field_required... OK
politepol      |   Applying frontend.0004_feed_edited... OK
politepol      |   Applying frontend.0005_auto_20180131_1949... OK
politepol      |   Applying frontend.0008_auto_20180215_1445.../usr/local/lib/python2.7/dist-packages/django/db/backends/mysql/base.py:124: Warning: Duplicate index 'frontend_post_feed_id_75a47426eda13de_idx' defined on the table 'politepol.frontend_post'. This is deprecated and will be disallowed in a future release.
politepol      |   return self.cursor.execute(query, args)
politepol      | 
politepol      |  OK
politepol      |   Applying sessions.0001_initial... OK
politepol      |   Applying sites.0001_initial... OK
politepol      | Installed 3 object(s) from 1 fixture(s)
politepol      | Traceback (most recent call last):
politepol      |   File "./downloader.py", line 2, in <module>
politepol      |     from pol.server import Server
politepol      | ImportError: No module named pol.server
politepol      | [14/Mar/2020 23:25:17] "GET /en/ HTTP/1.0" 200 6490
politepol      | [14/Mar/2020 23:25:18] "GET /static/frontend/stylesheets/application.css HTTP/1.0" 200 1372
politepol      | [14/Mar/2020 23:25:18] "GET /static/frontend/stylesheets/wizard.css.css HTTP/1.0" 200 1575


docker composer file

version: "3"

services:
  politepol:
    build:
      context: .
    environment:
      DB_NAME: 'politepol'
      DB_USER: 'rooooooooooot'
      DB_PASSWORD: 'toooooooooooor'
      DB_HOST: 'dbpolitepol'
      DB_PORT: '3306'
      WEB_PORT: '8088'
      TIME_ZONE: 'America\/Fortaleza'
    image: politepol:latest
    depends_on:
      - 'dbpolitepol'
    #command: ["./wait-for-it.sh", "dbpolitepol:3306", "--", "/bin/bash", "./frontend/start.sh"]
    command: ["./wait-for-it.sh", "dbpolitepol", "/bin/bash", "./frontend/start.sh"]
    container_name: politepol
    restart: unless-stopped
    networks:
      - politepol-network
    ports:
      - '8088:8088'

  dbpolitepol:
    image: mysql:5.7
    container_name: dbpolitepol
    restart: unless-stopped
    environment:
      MYSQL_DATABASE: 'politepol'
      MYSQL_USER: 'rooooooooooot'
      MYSQL_PASSWORD: 'toooooooooooor'
      MYSQL_ROOT_PASSWORD: 'rootpass'
    networks:
      - politepol-network
    volumes:
      - ./mysql:/var/lib/mysql

networks:
  politepol-network:
    driver: 'bridge'


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant