Commit 47080e6 1 parent ad6826e commit 47080e6 Copy full SHA for 47080e6
File tree 3 files changed +43
-5
lines changed
3 files changed +43
-5
lines changed Original file line number Diff line number Diff line change
1
+ name : Production deployment
2
+
3
+ on :
4
+ release :
5
+ types : [published]
6
+
7
+ jobs :
8
+ publish :
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - name : Checkout the repo
12
+ uses : actions/checkout@v2
13
+
14
+ - name : Log in to Docker Hub
15
+ uses : docker/login-action@v3
16
+ with :
17
+ username : ${{ secrets.DOCKER_USERNAME }}
18
+ password : ${{ secrets.DOCKER_PASSWORD }}
19
+ - name : Extract metadata (tags, labels) for Docker
20
+ id : meta
21
+ uses : docker/metadata-action@v5
22
+ with :
23
+ images : appwrite/console
24
+ - name : Build and push Docker image
25
+ id : push
26
+ uses : docker/build-push-action@v6
27
+ with :
28
+ context : .
29
+ file : ./Dockerfile
30
+ push : true
31
+ tags : ${{ steps.meta.outputs.tags }}
32
+ labels : ${{ steps.meta.outputs.labels }}
33
+ build-args : |
34
+ "VITE_CONSOLE_MODE=self-hosted""
35
+ "VITE_APPWRITE_GROWTH_ENDPOINT=${{ vars.VITE_APPWRITE_GROWTH_ENDPOINT }}"
Original file line number Diff line number Diff line change 1
1
FROM node:20-alpine as build
2
2
3
+ WORKDIR /app
4
+
3
5
ENV PNPM_HOME="/pnpm"
4
6
ENV PATH="$PNPM_HOME:$PATH"
5
7
RUN corepack enable
6
- WORKDIR /app
8
+
9
+ ADD ./package.json /app/package.json
10
+ ADD ./pnpm-lock.yaml /app/pnpm-lock.yaml
11
+
12
+ RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
7
13
8
14
ADD ./build.js /app/build.js
9
15
ADD ./tsconfig.json /app/tsconfig.json
10
16
ADD ./svelte.config.js /app/svelte.config.js
11
17
ADD ./vite.config.ts /app/vite.config.ts
12
- ADD ./package.json /app/package.json
13
- ADD ./pnpm-lock.yaml /app/pnpm-lock.yaml
14
18
ADD ./src /app/src
15
19
ADD ./static /app/static
16
20
@@ -24,7 +28,6 @@ ENV VITE_APPWRITE_GROWTH_ENDPOINT=$VITE_APPWRITE_GROWTH_ENDPOINT
24
28
ENV VITE_CONSOLE_MODE=$VITE_CONSOLE_MODE
25
29
ENV VITE_STRIPE_PUBLIC_KEY=$VITE_STRIPE_PUBLIC_KEY
26
30
27
- RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
28
31
RUN pnpm run sync && pnpm run build
29
32
30
33
FROM nginx:1.25-alpine
Original file line number Diff line number Diff line change @@ -23,4 +23,4 @@ services:
23
23
- VITE_APPWRITE_GROWTH_ENDPOINT
24
24
- VITE_STRIPE_PUBLIC_KEY
25
25
ports :
26
- - ' 3000:3000 '
26
+ - ' 3000:80 '
You can’t perform that action at this time.
0 commit comments