Docker-Compose Setup with Socket Proxy, Traefik2 & Docker Secrets
Hello there! I`m a first time user trying to setup Coder to easily create JupyterLab and RStudio Workspaces for my Physics Study's.
My current Docker Compose setup includes:
- Traefik2 as reverse proxy
- Docker Socket Proxy for enchanted security
- Authelia (with a Postgres Database) as 2FA Auth Service
- Docker Secrets to store sensitive information
I have several Questions regarding running Coder with Docker Compose:
1.) How do i correctly set the CODER_PG_CONNECTION_URL environment variable using docker secrets?
2.) Is it necessary to set a CODER_ADDRESS if i'm using Traefik2 as reverse proxy?
3.) Does Coder recognise the environment variable "DOCKER_HOST: tcp://socket-proxy:2375"?
4.) Which Volume Path do i have to map on Coder's side to make data persistent?
Thank you so much upfront for helping and i'm very sorry if my questions are just stupid!
4 Replies
<#1093583431465705574>
Category
Help needed
Product
Coder OSS (v2)
Platform
Linux
Logs
Please post any relevant logs/error messages.
hey @SwoopyT sorry for the delay !
1) i am unfamiliar with docker secrets, but it seems that they're being mounted to
/run/secrets
, and i'm pretty sure that Coder doesn't support that (cc: @kyle) -- maybe it'd be an interesting feature to have
the only workarounds I can find need to replace the entrypoint file and that sincerely sucks (https://stackoverflow.com/questions/48094850/docker-stack-setting-environment-variable-from-secrets)
2) I think coder does require the CODER_ADDRESS
variable to know where to listen, but you could simply set it to 0.0.0.0:80
if you're proxying (that's what I do with caddy)
3) I don't think so but I can't be certain
4) the coder container itself doesn't require any persistence, only postgres does
btw, there's an example compose file available @ https://github.com/coder/coder/blob/main/docker-compose.yamlStack Overflow
docker stack: setting environment variable from secrets
I was trying to set the password from secrets but it wasn't picking it up.
Docker Server verions is 17.06.2-ce. I used the below command to set the secret:
echo "abcd" | docker secret create pass...
GitHub
coder/docker-compose.yaml at main · coder/coder
A tool that provisions remote development environments via Terraform - coder/docker-compose.yaml at main · coder/coder
@Phorcys is correct. We don't support reading from the secrets file right now.
always love being correct