Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Commit 9d8ca06

Browse files
authored
fix issues with env vars and entrypoint (#79)
* fix issues with env vars and entrypoint * update example env.list
1 parent c7b16b9 commit 9d8ca06

File tree

4 files changed

+16
-4
lines changed

4 files changed

+16
-4
lines changed

docker/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ generate: env-file-exists build
2828
# Start the CA chatbot in the background
2929
serve: env-file-exists ca-key-exists
3030
docker run -d --restart unless-stopped --env-file ./env.list -v $(CURDIR)/example-keybaseca-volume:/mnt:rw ca:latest ./entrypoint-server.sh
31-
@echo "Started CA bot service in the background... Use `docker ps` and `docker logs` to monitor it"
31+
@echo 'Started CA bot service in the background... Use `docker ps` and `docker logs` to monitor it'
3232

3333
# Stop the service
3434
stop:

docker/entrypoint-generate.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ chown -R keybase:keybase /mnt
88
# Run everything else as the keybase user
99
sudo -i -u keybase bash << EOF
1010
export "FORCE_WRITE=$FORCE_WRITE"
11+
export "TEAMS=$TEAMS"
12+
export "KEYBASE_USERNAME=$KEYBASE_USERNAME"
13+
export "KEYBASE_PAPERKEY=$KEYBASE_PAPERKEY"
1114
nohup bash -c "KEYBASE_RUN_MODE=prod kbfsfuse /keybase | grep -v 'ERROR Mounting the filesystem failed' &"
1215
sleep 3
1316
keybase oneshot

docker/entrypoint-server.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ chown -R keybase:keybase /mnt
77

88
# Run everything else as the keybase user
99
sudo -i -u keybase bash << EOF
10+
export "TEAMS=$TEAMS"
11+
export "KEYBASE_USERNAME=$KEYBASE_USERNAME"
12+
export "KEYBASE_PAPERKEY=$KEYBASE_PAPERKEY"
1013
nohup bash -c "KEYBASE_RUN_MODE=prod kbfsfuse /keybase | grep -v 'ERROR Mounting the filesystem failed' &"
1114
sleep 3
1215
keybase oneshot

docker/env.list.example

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
# List the subteams here separated by commas (eg "teamname.ssh.production,teamname.ssh.staging") that you
22
# wish to use to grant SSH access
3-
TEAMS="teamname.ssh.staging,teamname.ssh.production,..."
3+
TEAMS=teamname.ssh.staging,teamname.ssh.production
44

55
# Login info for the chat bot
6-
KEYBASE_USERNAME="username_of_ca_bot"
7-
KEYBASE_PAPERKEY="paper key for the ca bot"
6+
KEYBASE_USERNAME=username_of_ca_bot
7+
KEYBASE_PAPERKEY=paper key for the ca bot
8+
9+
# DO NOT QUOTE VARIABLE VALUES
10+
#
11+
# These variables will be single quoted when loaded into the container. If you quote them here, those
12+
# quotes will become part of the variable value.
13+

0 commit comments

Comments
 (0)