Giter VIP home page Giter VIP logo

Comments (8)

galexrt avatar galexrt commented on September 26, 2024

Is this section good enough/understandable https://github.com/galexrt/docker-healthchecks#run-managepy-inside-the-container ?

from container-healthchecks.

Braintelligence avatar Braintelligence commented on September 26, 2024

Yeah I think so.
I've seen other docker containers with shorter docker commands. For example I've never seen a /entrypoint.sh there before the subcommands.
Can this be shortened?

from container-healthchecks.

galexrt avatar galexrt commented on September 26, 2024

@Braintelligence It would be either the "shortcut" /entrypoint.sh app:managepy or python3 /healthchecks/manage.py which is even longer for manage.py.

The others don't use manage.py so don't need to go through /entrypoint.sh.

from container-healthchecks.

Braintelligence avatar Braintelligence commented on September 26, 2024

https://github.com/pydanny/cookiecutter-django does it like this: http://cookiecutter-django.readthedocs.io/en/latest/deployment-with-docker.html#run-your-app-with-docker-compose

This should be docker exec commands, from what I know.

I thought maybe we could use a similar structure.

from container-healthchecks.

galexrt avatar galexrt commented on September 26, 2024

It is a docker exec, the /entrypoint.sh is from inside the container.

docker exec -it CONTAINER_NAME /entrypoint.sh app:managepy YOUR_MANAGE_PY_FLAGS_COMMAND
https://github.com/galexrt/docker-healthchecks#run-managepy-inside-the-container

What do you mean exactly?

from container-healthchecks.

Braintelligence avatar Braintelligence commented on September 26, 2024

I meant a structure like this: docker-compose -f production.yml run django python manage.py shell

Reworked for exec.

So exec would look something like
docker exec -it CONTAINER_NAME python manage.py ARGUMENT

Is it possible to leave out the entrypoint.sh in the exec invoke and make like a switch-case?
Something like

if argument_1 == python:
# we know, that we need to use python for the following argument
        if argument_2 == manage.py
        # we use python as binary for manage.py in the django context and apply argument_3 as subcommand

from container-healthchecks.

galexrt avatar galexrt commented on September 26, 2024

@Braintelligence That is what the entrypoint.sh script does. See https://github.com/galexrt/docker-healthchecks/blob/master/entrypoint.sh#L132-L135 and https://github.com/galexrt/docker-healthchecks/blob/master/entrypoint.sh#L142-L155.

from container-healthchecks.

Braintelligence avatar Braintelligence commented on September 26, 2024

This is documented and alright.

from container-healthchecks.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.