Skip to content

Commit

Permalink
clone assets
Browse files Browse the repository at this point in the history
  • Loading branch information
srliao committed Apr 11, 2024
1 parent de849f4 commit 9434e75
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
7 changes: 5 additions & 2 deletions cmd/preview/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
FROM alpine:3.16.3
RUN apk add --no-cache git
WORKDIR /
COPY init.sh /init.sh
RUN chmod +x /init.sh
COPY preview /preview
RUN ls -la
RUN chmod +x /preview
ENTRYPOINT ["/preview"]
RUN ls -la
ENTRYPOINT ["/init.sh"]
8 changes: 3 additions & 5 deletions cmd/preview/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ services:
- CF_TUNNEL_TOKEN
restart: unless-stopped
redis:
# name: redis-stack
image: redis/redis-stack:latest
ports:
- 6379:6379
Expand All @@ -27,16 +26,15 @@ services:
- rod
build:
context: .
# volumes:
# - /home/srliao/code/assets/assets:/assets
environment:
- PORT=7777
- LAUNCHER_URL=ws://rod:7317
- ASSETS_PATH=/assets
- ASSETS_PATH=/assets/assets
- REDIS_URL=redis:6379
- PREVIEW_URL=http://preview:7777
- PROXY_TO=https://gcsim.app
- PROXY_TO
- AUTH_KEY
- ASSETS_PAT_TOKEN
ports:
- 7777:7777
restart: unless-stopped
11 changes: 11 additions & 0 deletions cmd/preview/init.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh

ls -la

# Get the value of the environment variable
PAT="$ASSETS_PAT_TOKEN"

# Clone the repository with the substituted value
git clone "https://$PAT@github.com/genshinsim/assets.git"

./preview

0 comments on commit 9434e75

Please sign in to comment.