-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
8 changed files
with
115 additions
and
4 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,2 @@ | ||
AUTH=https://auth.jingyijun.xyz:9443/api | ||
TREEHOLE=https://hole.jingyijun.xyz:9443/api |
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,2 @@ | ||
AUTH=https://auth.fduhole.com/api | ||
TREEHOLE=https://www.fduhole.com/api |
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: Publish to Docker - Development | ||
|
||
on: | ||
push: | ||
branches: [dev] | ||
|
||
env: | ||
APP_NAME: admin-frontend | ||
|
||
jobs: | ||
docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@master | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@master | ||
- name: Login to DockerHub | ||
uses: docker/login-action@master | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Build and push | ||
id: docker_build | ||
uses: docker/build-push-action@master | ||
with: | ||
push: true | ||
tags: | | ||
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.APP_NAME }}:dev | ||
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.APP_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,30 @@ | ||
name: Publish to Docker - Production | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
|
||
env: | ||
APP_NAME: auth-frontend-next | ||
|
||
jobs: | ||
docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@master | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@master | ||
- name: Login to DockerHub | ||
uses: docker/login-action@master | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Build and push | ||
id: docker_build | ||
uses: docker/build-push-action@master | ||
with: | ||
push: true | ||
tags: | | ||
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.APP_NAME }}:master | ||
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.APP_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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
node_modules | ||
pnpm-lock.yaml | ||
dist |
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,29 @@ | ||
FROM node:18-alpine as builder | ||
|
||
WORKDIR /app | ||
|
||
RUN npm install -g pnpm | ||
|
||
COPY package.json pnpm-lock.yaml /app/ | ||
|
||
RUN pnpm install --frozen-lockfile | ||
|
||
COPY . /app | ||
|
||
RUN pnpm build | ||
|
||
FROM nginx:alpine | ||
|
||
RUN rm /etc/nginx/conf.d/default.conf | ||
|
||
ADD default.conf /etc/nginx/conf.d/ | ||
|
||
COPY --from=builder /app/dist /usr/share/nginx/html | ||
|
||
COPY ./entryPoint.sh / | ||
RUN chmod +x entryPoint.sh | ||
|
||
EXPOSE 80 | ||
|
||
ENTRYPOINT ["sh","/entryPoint.sh"] | ||
CMD ["nginx", "-g", "daemon off;"] |
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,17 @@ | ||
# nginx config file | ||
|
||
server { | ||
listen 80; | ||
server_name localhost; | ||
|
||
location / { | ||
root /usr/share/nginx/html; | ||
index index.html index.htm; | ||
try_files $uri $uri/ /index.html; | ||
} | ||
|
||
error_page 500 502 503 504 /50x.html; | ||
location = /50x.html { | ||
root html; | ||
} | ||
} |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
// export const AUTH = "https://auth.fduhole.com/api"; | ||
export const AUTH = "https://auth.jingyijun.xyz:9443/api"; | ||
export const AUTH = "https://auth.fduhole.com/api"; | ||
// export const AUTH = "https://auth.jingyijun.xyz:9443/api"; | ||
|
||
// export const TREEHOLE = "https://www.fduhole.com"; | ||
export const TREEHOLE = "https://hole.jingyijun.xyz:9443/api"; | ||
export const TREEHOLE = "https://www.fduhole.com/api"; | ||
// export const TREEHOLE = "https://hole.jingyijun.xyz:9443/api"; |