-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1889 from scpwiki/WJ-994-dev-docker
[WJ-994] Fix framerail build in Docker
- Loading branch information
Showing
10 changed files
with
128 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: '[backend] Docker build Framerail (dev)' | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- 'framerail/**' | ||
- 'install/aws/dev/docker/web/Dockerfile' | ||
- '.github/workflows/docker-build-web.dev.yaml' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Build image | ||
run: docker build -f install/aws/dev/docker/web/Dockerfile . | ||
env: | ||
DOCKER_BUILDKIT: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: '[backend] Docker build Framerail (local)' | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- 'framerail/**' | ||
- 'install/local/dev/web/Dockerfile' | ||
- '.github/workflows/docker-build-web.local.yaml' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Build image | ||
run: docker build -f install/local/dev/web/Dockerfile . | ||
env: | ||
DOCKER_BUILDKIT: 1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: '[backend] Docker build Framerail (prod)' | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- 'framerail/**' | ||
- 'install/aws/prod/docker/web/Dockerfile' | ||
- '.github/workflows/docker-build-web.prod.yaml' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Build image | ||
run: docker build -f install/aws/prod/docker/web/Dockerfile . | ||
env: | ||
DOCKER_BUILDKIT: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# | ||
# Framerail build | ||
# | ||
|
||
FROM node:19-alpine | ||
|
||
# Install pnpm | ||
RUN npm install -g pnpm | ||
|
||
# Copy sources | ||
RUN mkdir /app | ||
WORKDIR /app | ||
COPY framerail/ ./ | ||
COPY assets ./src/assets | ||
|
||
# Install app | ||
RUN \ | ||
pnpm install && \ | ||
pnpm build && \ | ||
pnpm prune --prod && \ | ||
rm -rf src/ tests/ | ||
|
||
# Run command | ||
USER node:node | ||
ENV NODE_ENV=production | ||
EXPOSE 3000 | ||
|
||
CMD ["/usr/local/bin/node", "build"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# | ||
# Framerail build | ||
# | ||
|
||
FROM node:19-alpine | ||
|
||
# Install pnpm | ||
RUN npm install -g pnpm | ||
|
||
# Copy sources | ||
RUN mkdir /app | ||
WORKDIR /app | ||
COPY framerail/ ./ | ||
COPY assets ./src/assets | ||
|
||
# Install app | ||
RUN \ | ||
pnpm install && \ | ||
pnpm build && \ | ||
pnpm prune --prod && \ | ||
rm -rf src/ tests/ | ||
|
||
# Run command | ||
USER node:node | ||
ENV NODE_ENV=production | ||
EXPOSE 3000 | ||
|
||
CMD ["/usr/local/bin/node", "build"] |
This file was deleted.
Oops, something went wrong.