Code Monkey home page Code Monkey logo

do-app-firewall-entrypoint's Introduction

do-app-firewall-entrypoint

Digital Ocean does not support configuring a Droplet's firewall to allow inbound addresses or trusted sources from a container running on their App Platform PAAS.

This utility can be used in the entrypoint of a Docker container running on the Digital Ocean App Platform. It will add the IP address of the App Platform container to the allowed inbound list.

Required Environment Variables

STATIC_INBOUND_IPS: comma delimited list of ip addresses to keep in the inbound rules

FIREWALL_NAME: name of the firewall in Digital Ocean to update

FIREWALL_PORT: port of the firewall to match against

DO_ACCESS_TOKEN: access token to update the Digital Ocean firewall

Example

Use an entrypoint script similar to below:

#!/bin/sh

/app/do-app-firewall-entrypoint

# best to unset these variables before running the app
unset STATIC_INBOUND_IPS
unset FIREWALL_NAME
unset FIREWALL_PORT
unset DO_ACCESS_TOKEN

<path-to-app-binary>

Then include the do-app-firewall-entrypoint tool:

FROM golang:1.22-alpine as builder
RUN go install github.com/andrewmarklloyd/do-app-firewall-entrypoint@latest
...
COPY entrypoint.sh /entrypoint.sh
...
ENTRYPOINT ["/entrypoint.sh"]

do-app-firewall-entrypoint's People

Contributors

andrewmarklloyd avatar

Watchers

 avatar

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.