Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Andrew Tork Baker
    @atbaker
    @maximede @balacuit thanks! I’ll pre-install it next time
    Benjamin Goh
    @masotime
    @atbaker I have the same question as maximede.... but if I understand it correctly, django is running commands against the postgres container, that's why run works, and it's still written to the same db even though it's a different container....?
    Andrew Tork Baker
    @atbaker
    @masotime - I would put it this way: docker run makes a new django container that’s linked to the same postgres container
    There’s only ever one postgres container in play, but sometimes more than one other container linking to it
    @masotime - does that help?
    Benjamin Goh
    @masotime
    @atbaker ok got it, thanks :) yes that makes sense
    gphilp
    @gregorphilp
    I never seem to be able to get to any of my http links.
    looks like my docker-compose worked

    ubuntu@ip-172-31-42-198:~/github/docker-django$ docker-compose ps

          Name                        Command               State           Ports          

    dockerdjango_django_1 gunicorn -c gunicorn_conf. ... Up 0.0.0.0:8000->8000/tcp
    dockerdjango_memcached_1 /usr/bin/memcached -u memc ... Up 11211/tcp
    dockerdjango_postgres_1 /docker-entrypoint.sh postgres Up 5432/tcp

    so I tried http://172.31.42.198:8000 which is correct ?
    Andrew Tork Baker
    @atbaker
    @gregorphilp - Are you on a cloud server? I’ve noticed that accessing them via IP address doesn’t always work. In that case, try the ec2 hostname
    gphilp
    @gregorphilp
    ok, using hostname ip-172-31-42-198 didnt work either.
    Andrew Tork Baker
    @atbaker
    Sri Radhakrishna
    @sradhakrishna-rms
    @atbaker whats the login credentials to log into the Django sample site?
    never mind, I see a sign up button :-)
    gphilp
    @gregorphilp
    ok that link works. is that my ec2 or another?
    Andrew Tork Baker
    @atbaker
    @gregorphilp - that’s yours! :smile:
    @sradhakrishna-rms - And there’s no actual users in that app. I just ask you to click “Log in” so you can see the app break because the migrations aren’t yet applied
    Sri Radhakrishna
    @sradhakrishna-rms
    yep, got it.
    gphilp
    @gregorphilp
    ah yeah I see that if I ping it. so how do you get the hostname from cmdline?
    totally different from whats displayed :-)
    Andrew Tork Baker
    @atbaker
    @gregorphilp - I honestly don’t know. I’ve always started from the Google Doc. Maybe someone in the room knows how to get the full EC2 hostname from inside the machine?
    Benjamin Goh
    @masotime
    lol... I was just about to comment about bitcoins when I saw the note below. Yeah definitely turn off those keys soon :P
    Andrew Tork Baker
    @atbaker
    @masotime - yeah, this tutorial is an exercise in trust for sure :smile:
    H. Wade Minter
    @minter
    Is docker-machine anything like the Miami Sound Machine?
    georgecook-cbt
    @georgecook-cbt
    @atbaker if you need to get the hostname of an EC2 instance, I think you can grab it from the instance metadata
    Benjamin Goh
    @masotime
    Should the docker-machine command be eval "$(docker-machine env YOUR_NAME_HERE)"? When I tried to run the $(docker...) command directly it gave me errors.
    Andrew Tork Baker
    @atbaker
    @masotime - I usually get it working with eval "$(docker-machine env foo)” where foo is my docker-machine name
    Benjamin Goh
    @masotime
    ok got it. the tutorial might need to be edited though, it doesn't have the eval part
    the last command for exercise-3, docker-machine ip should probably be docker-machine ip YOUR_NAME_HERE
    Andrew Tork Baker
    @atbaker
    @masotime - thanks! Just updated the exercise - does it look right now?
    Sri Radhakrishna
    @sradhakrishna-rms
    @atbaker Its been 5+ mins, does it take longer to provision the new server
    H. Wade Minter
    @minter
    Mine took 5-10, I think.
    Andrew Tork Baker
    @atbaker
    @sradhakrishna-rms - 5 minutes is a little long, but it might be working. What did you name your server? I can check in my AWS console
    Sri Radhakrishna
    @sradhakrishna-rms
    its stuck on this message "Creating CA: /home/ubuntu/.docker/machine/certs/ca.pem"
    Benjamin Goh
    @masotime
    @atbaker Yup it looks good :)
    Matthew Swanson
    @mswanson75
    Probably too late to get a response, but I'm confused at how running the migration in a new container is able to access the database in a different container. Isn't the data within a container isolated (unless you're using a volume for the database storage)?
    Andrew Tork Baker
    @atbaker
    @mswanson75 - not too late! We talked about this a little above. Long story short, when docker-compose starts a new container for the django service, it links it to the existing postgres service’s container. So for a brief moment, two django containers are linked to the same postgres container
    MartinScholzBerlin
    @MartinScholzBerlin
    Hi, on docker-compose up I got:
    ERROR: Get https://registry-1.docker.io/v2/atbaker/memcached-verbose/manifests/latest: unauthorized: incorrect username or password
    MartinScholzBerlin
    @MartinScholzBerlin
    Sorry, forgot to docker login (I did each exercise on an other day)
    Banks dada
    @bankoledada
    I am a scrum master about to work in a devops environment. trying my hands on docker to appreciate what developers do!! I mat be an observer for a while. Just watched atbakers docker presentation on youtube and i think i want to learn this. Complete newbie who develops with wordpress themes.. closes to development i have done, used to be able to write code before but got tired and retired from code writing...
    Sharon Shmorak
    @dsysme
    image.png
    Hi, I get the following error working on ex3
    Any quick advice?
    version: '3'
    services:
      django:
        build: .
        volumes:
          - .:/usr/src/app
        links:
          - postgres
          - memcached
        ports: 
          - "8000:8000"          
    
      postgres:
        image: postgres:9.3
    
      memcached:
        image: atbaker/memcached-verbose
    Sharon Shmorak
    @dsysme
    @atbaker
    Sharon Shmorak
    @dsysme
    @atbaker forgot to say that the exercises are super helpful and thank you for help me (and others of course)
    Sylvain Schellenberger
    @raaaahman
    @dsysme Hey Sharon, I had the same problem. This tutorial was written in 2015 and docker-compose was at version 1 at this point (at least, atbaker used version 1). Since then, the links key was deprecated. If you want to finish this tutorial, you can just remove the version and services keys and docker-compose will user version. If you want to get knowledge for actual usage of docker-compose, you might read about how to share environment variables, though I can't help you with that...