Skip to content

Commit

Permalink
chore: add run scripts for WSL
Browse files Browse the repository at this point in the history
  • Loading branch information
rschlaefli committed Jul 31, 2024
1 parent 5dd36e4 commit 16992ba
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 25 deletions.
13 changes: 0 additions & 13 deletions _run_app_dependencies.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,4 @@
#!/bin/sh

# enable pnpm support in volta
grep -qxF 'export VOLTA_FEATURE_PNPM=1' ~/.zshrc || echo 'export VOLTA_FEATURE_PNPM=1' >> ~/.zshrc
grep -qxF 'alias pn=pnpm' ~/.zshrc || echo 'alias pn=pnpm' >> ~/.zshrc

# add hosts
# sudo grep -qxF '127.0.0.1 api.klicker.com' ~/.zshrc || sudo echo '127.0.0.1 api.klicker.com' >> ~/.zshrc
# sudo grep -qxF '127.0.0.1 pwa.klicker.com' ~/.zshrc || sudo echo '127.0.0.1 pwa.klicker.com' >> ~/.zshrc
# sudo grep -qxF '127.0.0.1 manage.klicker.com' ~/.zshrc || sudo echo '127.0.0.1 manage.klicker.com' >> ~/.zshrc
# sudo grep -qxF '127.0.0.1 control.klicker.com' ~/.zshrc || sudo echo '127.0.0.1 control.klicker.com' >> ~/.zshrc
# sudo grep -qxF '127.0.0.1 auth.klicker.com' ~/.zshrc || sudo echo '127.0.0.1 auth.klicker.com' >> ~/.zshrc
# sudo grep -qxF '127.0.0.1 func-responses.klicker.com' ~/.zshrc || sudo echo '127.0.0.1 func-responses.klicker.com' >> ~/.zshrc
# sudo grep -qxF '127.0.0.1 func-response-processor.klicker.com' ~/.zshrc || sudo echo '127.0.0.1 func-response-processor.klicker.com' >> ~/.zshrc

# start postgres, redis, and reverse proxy
docker compose up postgres redis_exec redis_cache reverse_proxy_docker
4 changes: 4 additions & 0 deletions _run_app_dependencies_wsl.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh

# start postgres, redis, and reverse proxy
docker compose up postgres redis_exec redis_cache reverse_proxy_wsl
10 changes: 5 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
services:
reverse_proxy:
reverse_proxy_docker:
image: docker.io/library/traefik:v2.10
command:
- --api.insecure=true
Expand All @@ -8,14 +8,14 @@ services:
- --providers.file.watch=true
- --entrypoints.web.address=:80
ports:
- 8088:80
- 80:80
- 8080:8080
volumes:
- "./util/traefik/rules.yaml:/etc/traefik/rules.yaml"
- "./util/traefik/rules_docker.yaml:/etc/traefik/rules.yaml"
networks:
- klicker

reverse_proxy_docker:
reverse_proxy_wsl:
image: docker.io/library/traefik:v2.10
command:
- --api.insecure=true
Expand All @@ -27,7 +27,7 @@ services:
- 80:80
- 8080:8080
volumes:
- "./util/traefik/rules_docker.yaml:/etc/traefik/rules.yaml"
- "./util/traefik/rules_wsl.yaml:/etc/traefik/rules.yaml"
networks:
- klicker

Expand Down
14 changes: 7 additions & 7 deletions util/traefik/rules.yaml → util/traefik/rules_wsl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,34 +46,34 @@ http:
api:
loadBalancer:
servers:
- url: "http://host.containers.internal:3000"
- url: "http://172.25.8.0:3000"

pwa:
loadBalancer:
servers:
- url: "http://host.containers.internal:3001"
- url: "http://172.25.8.0:3001"

manage:
loadBalancer:
servers:
- url: "http://host.containers.internal:3002"
- url: "http://172.25.8.0:3002"

control:
loadBalancer:
servers:
- url: "http://host.containers.internal:3003"
- url: "http://172.25.8.0:3003"

auth:
loadBalancer:
servers:
- url: "http://host.containers.internal:3010"
- url: "http://172.25.8.0:3010"

func-responses:
loadBalancer:
servers:
- url: "http://host.containers.internal:7072"
- url: "http://172.25.8.0:7072"

func-response-processor:
loadBalancer:
servers:
- url: "http://host.containers.internal:7073"
- url: "http://172.25.8.0:7073"

0 comments on commit 16992ba

Please sign in to comment.