Skip to content

Instantly share code, notes, and snippets.

View kokovych's full-sized avatar

Bohdan kokovych

  • Dnipro, Ukraine
View GitHub Profile
@kokovych
kokovych / only_django_in_container.md
Last active February 20, 2022 22:20
Only Django inside docker container and local database(postgres) is not in container

Create django project with localhost database

Acutally, this is example of my Dockerfile and docker-compose.yml. I worked on mac OS. I would like to run my django app inside docker container, but I didn't want to use container with postgres db inside docker. I have already installed and running postgres instance with all data I need. So django is in container, postgres is out.

  • My Dockerfile:
import xlrd
rb = xlrd.open_workbook('SchoolOnboardingTemplate111.xlsx')
print "open file schools.xls -- success "
sheet = rb.sheet_by_index(0)
worksheet = rb.sheet_by_name('School Information')
cell = worksheet.cell(rowx=2, colx=2)
print cell
print type(cell)