-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitpod.yml
31 lines (30 loc) · 1.36 KB
/
.gitpod.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# This configuration file was automatically generated by Gitpod.
# Please adjust to your needs (see https://www.gitpod.io/docs/config-gitpod-file)
# and commit this file to your remote git repository to share the goodness with others.
image: ghcr.io/tomglennhs/gitpod:main
tasks:
- name: tailscale
command: |
echo "\x1b[1;32mClick on the Tailscale link, login with GitHub, then select the tomglennhs organization to have 3d printer access from your workspace.""
if [ -n "${TAILSCALE_STATE_ENOK}" ]; then
sudo -E tailscale up --accept-routes
else
sudo -E tailscale up --hostname "gitpod-${GITPOD_GIT_USER_NAME// /-}-$(echo ${GITPOD_WORKSPACE_CONTEXT} | jq -r .repository.name)" --accept-routes
# store the tailscale state into gitpod user
gp env TAILSCALE_STATE_ENOK="$(sudo cat /var/lib/tailscale/tailscaled.state)"
fi
exit
- command: poetry install && poetry run uvicorn main:app --reload
name: Run API
# https://www.gitpod.io/docs/configure/tailscale
- name: tailscaled
command: |
if [ -n "${TAILSCALE_STATE_ENOK}" ]; then
# restore the tailscale state from gitpod user's env vars
sudo mkdir -p /var/lib/tailscale
echo "${TAILSCALE_STATE_ENOK}" | sudo tee /var/lib/tailscale/tailscaled.state > /dev/null
fi
sudo tailscaled
vscode:
extensions:
- ms-python.python