#Anyone got an example of using the proxy
1 messages ยท Page 1 of 1 (latest)
@dull fern I can cook up a new example, but used it many times in the past like this
https://github.com/jpadams/legend-daggerize-minimal-maven/blob/main/dagger/src/index.ts#L26-L31
I've got that in code, just trying to make it work with a clever little script + shebang
#!/usr/bin/env dagger
web=$(container | from nginx | with-exposed-port 80)
db=$(container | from postgres | with-exposed-port 5432 | with-env-variable POSTGRES_PASSWORD postgres)
proxy=$(github.com/kpenfound/dagger-modules/proxy |
with-service $($web | as-service) "web" 80 80 |
with-service $($db | as-service) "db" 5432 5432
)
$proxy | service | up
work for you @dull fern ? ๐
I'll give it a go in the morning, thanks!
Thanks for this module @toxic plover ๐
a classic ๐
there's also an example in the Daggerverse ๐ https://daggerverse.dev/mod/github.com/kpenfound/dagger-modules/proxy@3e9129a119151eb122e5fe380bd2d4313d8fc001#Proxy.service
Slightly related to this: should services binding to services work? Service -> Service -> host?