Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define services in config and add Docker workflow #41

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

iamsilk
Copy link

@iamsilk iamsilk commented May 5, 2024

This PR makes two additions:

  1. Services are defined via the config instead of code. This works by adding two environment variables: VM_IP and TULIP_SERVICES_PATH. The TULIP_SERVICES_PATH variable specifies the path to a JSON file with the services.
  2. Adds a GitHub workflow to build and publish each Docker image, removing the need to build the images on the deployment machine.

This PR publishes the Docker images to the GitHub Container Registry, not Docker Hub. My use case used GHCR, but feel free to adjust the workflow to your needs.

If merging, make sure to change the image links in the docker-compose.prod.yml file from ghcr.io/iamsilk to ghcr.io/OpenAttackDefenseTools.

@meme-lord
Copy link
Contributor

This is great, you can make it cleaner by just putting the json data into the .env file:

# The services and ports
SERVICES_JSON='[
    {
        "port": 9876,
        "name": "cc_market"
    },
    {
        "port": 80,
        "name": "maze"
    },
    {
        "port": 8080,
        "name": "scadent"
    },
    {
        "port": 5000,
        "name": "starchaser"
    },
    {
        "port": 1883,
        "name": "scadnet_bin"
    },
    {
        "port": -1,
        "name": "other"
    }
]'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants