Sign inSign up

albertalvarezbruned/django

By albertalvarezbruned

Updated about 8 years ago

django dockerized first installation at now, next step with db

Image
0

567

albertalvarezbruned/django repository overview

django

To run correctly django with postgres I's necessary clone git repository and execute docker-compose up Now the environment variables of django are customitzables, not the postgres because in settings.py file Django waits this values.

version: "2" 
services: 
  postgres:
    container_name: postgres
    image: postgres 
    environment:
      - POSTGRES_PASSWORD=postgres
      - POSTGRES_USER=postgres
      - POSTGRES_DB=postgres
      - PGDATA=/var/lib/postgresql/data/pgdata
    volumes:
      - ./db-data:/var/lib/postgresql/data/pgdata
    ports:
      - "5433:5432"
  django: 
    container_name: django_server 
    image: albertalvarezbruned/django 
    stdin_open: true 
    tty: true 
    volumes: 
      - ./myproject:/myproject/myproject #only if you clone repo 
    ports: 
      - "8000:8000" 
    depends_on: 
      - postgres 
    environment: 
      - DJUSER=admin 
      - DJPASS=passadmin 
      - DJEMAIL="[email protected]" 
      - DJPORT=8000 

Tag summary

Content type

Image

Digest

Size

390.3 MB

Last updated

about 8 years ago

docker pull albertalvarezbruned/django