Highly ambitious ATProtocol AppView service and sdks

fix Dockerfile fly.toml setup for frontend

+15 -20
+1 -1
.github/workflows/frontend.yml
··· 21 21 uses: superfly/flyctl-actions/setup-flyctl@master 22 22 23 23 - name: Deploy to Fly.io 24 - run: flyctl deploy --config frontend/fly.toml --dockerfile frontend/Dockerfile 24 + run: flyctl deploy --config frontend.fly.toml --dockerfile frontend/Dockerfile 25 25 env: 26 26 FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
+13 -18
frontend/Dockerfile
··· 5 5 6 6 WORKDIR /app 7 7 8 - # Copy workspace root files 9 - COPY deno.json ./deno.json 10 - COPY deno.lock ./deno.lock 8 + # Copy workspace structure maintaining relative paths 9 + COPY deno.json /app/deno.json 10 + COPY deno.lock /app/deno.lock 11 + COPY frontend/ /app/frontend/ 12 + COPY packages/oauth/ /app/packages/oauth/ 13 + COPY packages/codegen/ /app/packages/codegen/ 14 + COPY packages/session/ /app/packages/session/ 15 + COPY docs/ /app/docs/ 11 16 12 - # Copy only required packages 13 - COPY packages/oauth ./packages/oauth 14 - COPY packages/codegen ./packages/codegen 15 - COPY packages/session ./packages/session 16 - 17 - # Copy docs 18 - COPY docs ./docs 17 + # Cache from frontend directory 18 + RUN deno cache ./frontend/src/main.ts 19 19 20 - # Copy frontend files to frontend subdirectory 21 - COPY frontend ./frontend 22 - 23 - # Change to frontend directory and cache 24 - WORKDIR /app/frontend 25 - RUN deno cache src/main.ts 26 - 20 + # Prefer not to run as root 21 + USER deno 27 22 EXPOSE 8080 28 23 29 - CMD ["run", "-A", "src/main.ts"] 24 + CMD ["run", "-A", "./frontend/src/main.ts"]
+1 -1
frontend/fly.toml frontend.fly.toml
··· 7 7 primary_region = 'sea' 8 8 9 9 [build] 10 - dockerfile = './Dockerfile' 10 + dockerfile = './frontend/Dockerfile' 11 11 12 12 [env] 13 13 PORT = '8080'