tangled
alpha
login
or
join now
slices.network
/
slices
137
fork
atom
Highly ambitious ATProtocol AppView service and sdks
137
fork
atom
overview
issues
10
pulls
3
pipelines
fix Dockerfile fly.toml setup for frontend
chadtmiller.com
5 months ago
bd337015
454f0a6d
+15
-20
3 changed files
expand all
collapse all
unified
split
.github
workflows
frontend.yml
frontend
Dockerfile
frontend.fly.toml
+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
24
-
run: flyctl deploy --config frontend/fly.toml --dockerfile frontend/Dockerfile
24
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
8
-
# Copy workspace root files
9
9
-
COPY deno.json ./deno.json
10
10
-
COPY deno.lock ./deno.lock
8
8
+
# Copy workspace structure maintaining relative paths
9
9
+
COPY deno.json /app/deno.json
10
10
+
COPY deno.lock /app/deno.lock
11
11
+
COPY frontend/ /app/frontend/
12
12
+
COPY packages/oauth/ /app/packages/oauth/
13
13
+
COPY packages/codegen/ /app/packages/codegen/
14
14
+
COPY packages/session/ /app/packages/session/
15
15
+
COPY docs/ /app/docs/
11
16
12
12
-
# Copy only required packages
13
13
-
COPY packages/oauth ./packages/oauth
14
14
-
COPY packages/codegen ./packages/codegen
15
15
-
COPY packages/session ./packages/session
16
16
-
17
17
-
# Copy docs
18
18
-
COPY docs ./docs
17
17
+
# Cache from frontend directory
18
18
+
RUN deno cache ./frontend/src/main.ts
19
19
20
20
-
# Copy frontend files to frontend subdirectory
21
21
-
COPY frontend ./frontend
22
22
-
23
23
-
# Change to frontend directory and cache
24
24
-
WORKDIR /app/frontend
25
25
-
RUN deno cache src/main.ts
26
26
-
20
20
+
# Prefer not to run as root
21
21
+
USER deno
27
22
EXPOSE 8080
28
23
29
29
-
CMD ["run", "-A", "src/main.ts"]
24
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
10
-
dockerfile = './Dockerfile'
10
10
+
dockerfile = './frontend/Dockerfile'
11
11
12
12
[env]
13
13
PORT = '8080'