FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
playfulprogramming/Dockerfile at main · playfulprogramming/playfulprogramming · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
playfulprogramming
/
playfulprogramming
Public
Uh oh!
There was an error while loading.
Please reload this page
.
Notifications
You must be signed in to change notification settings
Fork
106
Star
229
Code
Issues
86
Pull requests
22
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
playfulprogramming
/
Dockerfile
Copy path
More file actions
More file actions
Latest commit
History
History
History
42 lines (34 loc) · 1.22 KB
Breadcrumbs
playfulprogramming
/
Dockerfile
Copy path
File metadata and controls
42 lines (34 loc) · 1.22 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#
syntax=docker/dockerfile:1.7-labs
FROM
node:24-alpine3.23 AS builder
#
Create app directory
WORKDIR
/var/app
#
Prepare pnpm according to the root package.json
COPY
package.json .
RUN
corepack enable
RUN
corepack install
#
Install dependencies with pnpm
COPY
pnpm-lock.yaml .
RUN
--mount=type=cache,target=/root/.local/share/pnpm/store,sharing=locked pnpm install --filter
"!e2e"
#
Copy and build the app
COPY
--parents assets content public src project.inlang astro.config.ts tsconfig.json .env .
#
Define build arguments
ARG
GIT_COMMIT_REF
ARG
PUBLIC_CLOUDINARY_CLOUD_NAME
ARG
SITE_URL
ARG
MODE=production
RUN
--mount=type=secret,id=GITHUB_TOKEN \
--mount=type=secret,id=HOOF_AUTH_TOKEN \
GITHUB_TOKEN=$(cat /run/secrets/GITHUB_TOKEN) \
HOOF_AUTH_TOKEN=$(cat /run/secrets/HOOF_AUTH_TOKEN) \
GIT_COMMIT_REF=$GIT_COMMIT_REF \
PUBLIC_CLOUDINARY_CLOUD_NAME=$PUBLIC_CLOUDINARY_CLOUD_NAME \
SITE_URL=$SITE_URL \
ASTRO_TELEMETRY_DISABLED=1 \
pnpm build --mode $MODE
FROM
nginx:1.29.1-alpine3.22-slim
#
Copy the project nginx configuration
COPY
./nginx.conf /etc/nginx/conf.d/default.conf
#
Copy output HTML from the builder
COPY
--from=builder /var/app/dist /usr/share/nginx/html
#
Test the nginx config to make sure it works
RUN
nginx -t
Back
|
FazBrowse Home
|
New Git URL