-
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
1 parent
621bdf0
commit 99d3ac7
Showing
8 changed files
with
117 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,6 @@ | ||
node_modules | ||
dist | ||
.git | ||
.gitignore | ||
README.md | ||
.env* |
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,39 @@ | ||
name: Deploy Docker image | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
packages: write | ||
contents: read | ||
|
||
jobs: | ||
Deploy: | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- name: "Checkout" | ||
uses: "actions/checkout@v4" | ||
|
||
- name: "Set up QEMU" | ||
uses: "docker/setup-qemu-action@v3" | ||
|
||
- name: "Set up Docker Buildx" | ||
uses: "docker/setup-buildx-action@v3" | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and Push Docker Image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
platforms: linux/amd64 | ||
file: ./Dockerfile | ||
push: true | ||
tags: "ghcr.io/compbio-fhs/compbio-home: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 @@ | ||
{ | ||
"recommendations": [ | ||
"editorconfig.editorconfig", | ||
"vue.volar", | ||
"wayou.vscode-todo-highlight" | ||
], | ||
"unwantedRecommendations": [ | ||
"octref.vetur", | ||
"hookyqr.beautify", | ||
"dbaeumer.jshint", | ||
"ms-vscode.vscode-typescript-tslint-plugin" | ||
] | ||
} |
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,4 @@ | ||
{ | ||
"editor.bracketPairColorization.enabled": true, | ||
"editor.guides.bracketPairs": true | ||
} |
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,15 @@ | ||
FROM node:18-alpine as build-stage | ||
|
||
WORKDIR /app | ||
COPY package*.json ./ | ||
RUN npm install | ||
COPY . . | ||
RUN npm run build | ||
RUN ls -la dist/spa | ||
|
||
FROM nginx:stable-alpine as production-stage | ||
COPY --from=build-stage /app/dist/spa /usr/share/nginx/html | ||
COPY nginx.conf /etc/nginx/conf.d/default.conf | ||
RUN ls -la /usr/share/nginx/html | ||
EXPOSE 80 | ||
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,8 @@ | ||
# Stop and remove existing containers | ||
docker compose down | ||
|
||
# Rebuild without cache | ||
docker compose build --no-cache | ||
|
||
# Start and follow logs | ||
docker compose up --force-recreate |
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,9 @@ | ||
version: '3' | ||
services: | ||
app: | ||
build: . | ||
ports: | ||
- "81:80" | ||
restart: unless-stopped | ||
volumes: | ||
- ./nginx.conf:/etc/nginx/conf.d/default.conf |
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 @@ | ||
server { | ||
listen 80; | ||
server_name _; | ||
root /usr/share/nginx/html; | ||
index index.html; | ||
|
||
# Enable directory listing for debugging | ||
autoindex on; | ||
|
||
location / { | ||
try_files $uri $uri/ /index.html =404; | ||
add_header Cache-Control "no-cache"; | ||
} | ||
|
||
location /assets { | ||
expires 1y; | ||
add_header Cache-Control "public"; | ||
} | ||
|
||
# Add error logging | ||
error_log /var/log/nginx/error.log debug; | ||
access_log /var/log/nginx/access.log; | ||
} |