Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 2017-07-11T12:13:03.823882+00:00 app[web.1]: connection = Database.connect(**conn_params)
- 2017-07-11T12:13:03.823882+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/psycopg2/__init__.py", line 130, in connect
- 2017-07-11T12:13:03.823883+00:00 app[web.1]: conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
- 2017-07-11T12:13:03.823884+00:00 app[web.1]: django.db.utils.OperationalError: could not translate host name "db" to address: Name or service not known
- web: sh -c 'cd PROJECT/backend/project && gunicorn project.wsgi --log-file -'
- DockerProject
- ├── Dockerfile
- ├── Procfile
- ├── init.sql
- ├── requirements.txt
- ├── docker-compose.yml
- └── PROJECT
- ├── frontend
- └── backend
- └── project
- ├── prices
- ├── manage.py
- └── project
- └── all project files
- # Create image based on the official Node 6 image from dockerhub
- FROM node:6
- # Create a directory where our app will be placed
- RUN mkdir -p /usr/src/app
- # Change directory so that our commands run inside this new directory
- WORKDIR /usr/src/app
- # Copy dependency definitions
- COPY package.json /usr/src/app
- # Install dependecies
- RUN npm install
- # Get all the code needed to run the app
- COPY . /usr/src/app
- # Expose the port the app runs in
- EXPOSE 4200
- # Serve the app
- CMD ["npm", "start"]
- FROM python:3.6.1
- ENV PYTHONUNBUFFERED 1
- RUN mkdir /code
- WORKDIR /code
- ADD requirements.txt /code/
- RUN pip3 install -r requirements.txt
- ADD . /code/
- version: '3'
- services:
- db:
- image: postgres
- environment:
- POSTGRES_USER: aso
- POSTGRES_PASSWORD: somepass
- django:
- build: .
- command: python3 MainDirectory/backend/myProject/manage.py runserver 0.0.0.0:8001
- volumes:
- - .:/code
- ports:
- - "8001:8001"
- depends_on:
- - db
- angular:
- build: MainDirectory/frontend
- ports:
- - "4200:4200"
- depends_on:
- - django
- CREATE USER myUser;
- CREATE DATABASE myProject;
- GRANT ALL PRIVILEGES ON DATABASE myProject TO myUser;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement