Tag: django

Docker vs old approach (supervisor, git, your project)

I’m on Docker for past weeks and I can say I love it and I get the idea. But what I can’t figure out is how can I “transfer” my current set-up on Docker solution. I guess I’m not the only one and here is what I mean. I’m Python guys, more specifically Django. So […]

Micro-components architecture with python / Django / Drf

I have several applications in my Django project: – ticker – payments – crypto – referrals – core I am using Docker wrapped by Wercker (quite limiting I would say, but saves time). My question is, how to deploy each application as a standalone container as a start, and a standalone VPS Node in the […]

Mysql in a separate container or in the same [closed]

So, I am buildin a docker container for a django app and after reading a decent amount on the internet I found out that I can either include in docker-compose.yml an already made image for Mysql or I can include it in the container of the app. I was wondering what are the positive sides […]

docker Django runserver blocks binaries connecting to MySQL DB

I have a Django app running inside docker which use MySQL DB and it is working totally fine. I got several Python binaries which I need to run in docker while ./manage.py runserver is running. But running binaries give me following error. django.db.utils.OperationalError: (1045, “Access denied for user ‘web’@’’ (using password: YES)”) The error is […]

How to run a CMD and open Bash when running a docker container?

I am having a rough time trying to figure this out. So I have a dockerfile based on an Ubuntu image. At the end of my dockerfile I have: CMD django-admin startproject $PROJECTNAME I was told in a previous post that the base Ubuntu image has a CMD to run /bin/bash so my command is […]

fig up fails with error “create_container() takes at least 2 arguments”

I am trying to deploy and run my django application using docker and fig and I am running into the following error. TypeError: create_container() takes at least 2 arguments (3 given) Here’s the entire error log and the fig and docker files. (most of the details such as password are test details as I am […]

command not working in dockeraws.json in elastic beanstalk AWSEBDockerrunVersion:2

Hi I have a small docker container that I want to ship to elasticbeanstalk So this is my configuration: my Dockerfile that am using to build the image: FROM mwaaas/sms_packages:0.0.2 WORKDIR /root # create a folder code where we will put our code RUN mkdir code # add code to the folder ADD . code […]

PermissionError: [Errno 13] Permission denied: '/code/manage.py'

I was trying to run django app on docker container. Followed steps mentioned at https://docs.docker.com/compose/django/ But after running the command docker-compose run web django-admin.py startproject composeexample . I facing error PermissionError: [Errno 13] Permission denied: ‘/code/manage.py’ I’m using centos 7. please help [root@localhost docker-django]# docker-compose run web django-admin.py startproject composeexample . Traceback (most recent call […]

How to deploy django 1.8 on Elastic Beanstalk using Docker

My restrictions are: Django is to be deployed using uWSGI with nginx Django app is to use postgresql that is hosted on RDS the dockerfile will use ubuntu:14.04 as the container OS This is what I have for docker setup: https://github.com/simkimsia/aws-docker-django It contains a dockerfile and other configuration files. I have tested it on linux […]

Python subprocess — close Django server and Docker container with Ctrl-C, return to terminal

I’m trying to figure out how to properly close out my script that’s supposed to start up a Django server running in a docker container (boot2docker, on Mac OS X). Here’s the pertinent code block: try: init_code = subprocess.check_output(‘./initdocker.sh’, shell=True) subprocess.call(‘./startdockerdjango.sh’, shell=True) except subprocess.CalledProcessError: try: subprocess.call(‘./startdockerdjango.sh’, shell=True) except KeyboardInterrupt: return Where startdockerdjango.sh takes care of […]

Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.