Peng Ding commited on
Commit
39e5cf3
·
1 Parent(s): 414d3b8

fix: deploy-dev compose template token handling, use .env file

Browse files

- compose templates use ${VEILRENDER_API_TOKEN:-changeme} default
- deploy-dev sed injects token from remote .env
- Pool mode deploy verified with gateway + cloakhq/cloakbrowser

Files changed (3) hide show
  1. Makefile +2 -1
  2. deploy/compose-pool.yaml +1 -1
  3. deploy/compose.yaml +1 -1
Makefile CHANGED
@@ -82,7 +82,8 @@ endif
82
  scp $$COMPOSE_SRC $(SSH_TARGET):$(DEVTEST_STACK)/compose.yaml; \
83
  ssh $(SSH_TARGET) \
84
  'cd $(DEVTEST_STACK) && \
85
- sed -i "s|image: oaklight/veilrender:.*|image: $(DOCKER_IMAGE):dev-test|" compose.yaml && \
 
86
  docker compose up -d --force-recreate && \
87
  sleep 5 && \
88
  echo "=== Health check ===" && \
 
82
  scp $$COMPOSE_SRC $(SSH_TARGET):$(DEVTEST_STACK)/compose.yaml; \
83
  ssh $(SSH_TARGET) \
84
  'cd $(DEVTEST_STACK) && \
85
+ sed -i "s|image: oaklight/veilrender:[^ ]*|image: $(DOCKER_IMAGE):dev-test|" compose.yaml && \
86
+ sed -i "s|VEILRENDER_API_TOKEN=changeme|VEILRENDER_API_TOKEN=$${VEILRENDER_API_TOKEN:-changeme}|" compose.yaml && \
87
  docker compose up -d --force-recreate && \
88
  sleep 5 && \
89
  echo "=== Health check ===" && \
deploy/compose-pool.yaml CHANGED
@@ -16,7 +16,7 @@ services:
16
  ports:
17
  - "7860:7860"
18
  environment:
19
- - VEILRENDER_API_TOKEN=${VEILRENDER_API_TOKEN:?Set VEILRENDER_API_TOKEN}
20
  - VEILRENDER_RESOURCE_FILTER=true
21
  - VEILRENDER_WORKERS=http://browser-worker:9222
22
  - VEILRENDER_WORKER_MAX_CONCURRENT=${VEILRENDER_WORKER_MAX_CONCURRENT:-5}
 
16
  ports:
17
  - "7860:7860"
18
  environment:
19
+ - VEILRENDER_API_TOKEN=${VEILRENDER_API_TOKEN:-changeme}
20
  - VEILRENDER_RESOURCE_FILTER=true
21
  - VEILRENDER_WORKERS=http://browser-worker:9222
22
  - VEILRENDER_WORKER_MAX_CONCURRENT=${VEILRENDER_WORKER_MAX_CONCURRENT:-5}
deploy/compose.yaml CHANGED
@@ -7,7 +7,7 @@ services:
7
  ports:
8
  - "7860:7860"
9
  environment:
10
- - VEILRENDER_API_TOKEN=${VEILRENDER_API_TOKEN:?Set VEILRENDER_API_TOKEN}
11
  - VEILRENDER_RESOURCE_FILTER=true
12
  volumes:
13
  - veilrender-data:/data
 
7
  ports:
8
  - "7860:7860"
9
  environment:
10
+ - VEILRENDER_API_TOKEN=${VEILRENDER_API_TOKEN:-changeme}
11
  - VEILRENDER_RESOURCE_FILTER=true
12
  volumes:
13
  - veilrender-data:/data