-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cc0b73d
commit d0d1405
Showing
4 changed files
with
112 additions
and
0 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,23 @@ | ||
.circleci | ||
.github | ||
.git | ||
|
||
node_modules | ||
|
||
.DS_Store | ||
/dist | ||
|
||
.env.local | ||
.env.*.local | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
.idea | ||
.vscode | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? |
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,30 @@ | ||
name: release | ||
|
||
on: | ||
push: | ||
tags: | ||
- v*.*.* | ||
branches-ignore: | ||
- '**' | ||
|
||
env: | ||
IMAGE_NAME: traq-widget | ||
|
||
jobs: | ||
image: | ||
name: Build Docker Image | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set IMAGE_TAG env | ||
run: echo ::set-env name=IMAGE_TAG::$(echo ${GITHUB_REF:11}) | ||
- uses: actions/checkout@v2 | ||
- name: Login GitHub Registry | ||
run: docker login docker.pkg.github.com -u traPtitech -p ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build Image | ||
run: docker build -t docker.pkg.github.com/traptitech/traQ_Widget/${IMAGE_NAME}:${IMAGE_TAG} . | ||
- name: Push image to GitHub Registry | ||
run: docker push docker.pkg.github.com/traptitech/traQ_Widget/${IMAGE_NAME}:${IMAGE_TAG} | ||
- name: Push image to GitHub Registry (latest) | ||
run: | | ||
docker tag docker.pkg.github.com/traptitech/traQ_Widget/${IMAGE_NAME}:$IMAGE_TAG docker.pkg.github.com/traptitech/traQ_Widget/${IMAGE_NAME}:latest | ||
docker push docker.pkg.github.com/traptitech/traQ_Widget/${IMAGE_NAME}:latest |
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,13 @@ | ||
# alpineにするとnode-gypで死ぬ | ||
FROM node:14.3.0 as build | ||
WORKDIR /app | ||
COPY package*.json ./ | ||
RUN npm ci | ||
COPY . . | ||
RUN npm run build | ||
|
||
|
||
FROM caddy:2.0.0-alpine | ||
EXPOSE 80 | ||
COPY build/Caddyfile /etc/caddy/Caddyfile | ||
COPY --from=build /app/dist /usr/share/caddy |
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,46 @@ | ||
{ | ||
admin off | ||
} | ||
|
||
:80 | ||
|
||
encode zstd gzip | ||
|
||
file_server | ||
root * /usr/share/caddy | ||
|
||
@brotli { | ||
file { | ||
try_files {path}.br | ||
} | ||
header Accept-Encoding *br* | ||
} | ||
handle @brotli { | ||
header Content-Encoding br | ||
rewrite {http.matchers.file.relative} | ||
} | ||
|
||
@svg { | ||
file | ||
path *.svg | ||
} | ||
@css { | ||
file | ||
path *.css | ||
} | ||
@js { | ||
file | ||
path *.js | ||
} | ||
@html { | ||
file | ||
path *.html | ||
} | ||
@htmlpath { | ||
path_regexp ^[^.]*$ | ||
} | ||
header @svg Content-Type image/svg+xml | ||
header @css Content-Type text/css | ||
header @js Content-Type text/javascript | ||
header @html Content-Type text/html | ||
header @htmlpath Content-Type text/html |