Giter Club home page Giter Club logo

Comments (9)

jwillmer avatar jwillmer commented on July 17, 2024

Oh, sorry, I had the impression that u were looking for a demo configuration of a docker-compose file. Should have read you whole question :(

from webhookd.

rmeissn avatar rmeissn commented on July 17, 2024

That's still handy, but yeah, my question is about adding an executable script to your image to ease docker container deployment ;)

from webhookd.

jwillmer avatar jwillmer commented on July 17, 2024

I added docker-compose now to the image. This way you can call it inside of the image.

from webhookd.

jwillmer avatar jwillmer commented on July 17, 2024

For reference, i mount the image in docker-compose like this:

    webhookd:
        hostname: webhookd
        # build: ~/repos/webhookd/.
        image: ncarlier/webhookd:latest
        container_name: webhookd
        restart: always
        networks:
            - default
        ports:
            - "8080:8080"
        environment:
            - APP_SCRIPTS_DIR=/scripts
            - APP_HOOK_TIMEOUT=60
        volumes:
            - /var/run/docker.sock:/var/run/docker.sock
            - ~/docker/webhookd/scripts:/scripts
            - ~/docker/webhookd/logs:/tmp
            - ~/repos/demo/docker-compose.yml:/docker-compose.yml

and i call docker-compose like this in my script: docker-compose -p demo up -d

Note the folder name demo that I add to the docker-compose call.

from webhookd.

rmeissn avatar rmeissn commented on July 17, 2024

Sounds very good! Many thanks for adding docker-compose to this repository =)

from webhookd.

jwillmer avatar jwillmer commented on July 17, 2024

Well at the moment you need to build it yourself. I'm not the owner and can't push a new image to the repository. But on the bride side I can tell u that it works. I use it already in my deployment process.

Remember to fetch the repositories sub-modules via git submodule update --init --recursive before u build the image locally.

from webhookd.

ncarlier avatar ncarlier commented on July 17, 2024

Hello,
thanks for your MR. Once the Docker hub finish the build you should have a new Docker image with compose inside.
Regards.

from webhookd.

rmeissn avatar rmeissn commented on July 17, 2024

I've tested the latest image from docker hub. Works like a charm.
Just for documentation: I had to use some custom compose options to get it to work, otherwise compose won't find the compose file:

#!/bin/bash
#get the directory the script is in, as (in my case) the compose file is also located there
DIR=$(dirname $0)

docker-compose -p example -f $DIR/docker-compose.yml ps

from webhookd.

jwillmer avatar jwillmer commented on July 17, 2024

this is normal, if you run docker-compose without a file location it looks in your current directory for the configuration file (docker-compose.yml). If you like to use a compose file from a different directory you need to reference it with -f.

Me again, I get now what u mean 👍

from webhookd.

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.