Skip to content

Commit f85ee8e

Browse files
committed
update aws and vercel
1 parent 79fa306 commit f85ee8e

96 files changed

Lines changed: 16951 additions & 2672 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.github
2+
node_modules
3+
dist
4+
.editorconfig
5+
.gitignore
6+
.prettierrc
7+
.env.development
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
PUBLIC_ORGANIZATION=lemoncode
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
PUBLIC_ORGANIZATION=facebook
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: CD Workflow
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
env:
9+
IMAGE_NAME: ghcr.io/${{github.repository}}:${{github.run_number}}-${{github.run_attempt}}
10+
11+
permissions:
12+
contents: "read"
13+
packages: "write"
14+
15+
jobs:
16+
cd:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v4
21+
22+
- name: Log in to GitHub container registry
23+
uses: docker/login-action@v3
24+
with:
25+
registry: ghcr.io
26+
username: ${{ github.actor }}
27+
password: ${{ secrets.GITHUB_TOKEN }}
28+
29+
- name: Build and push docker image
30+
run: |
31+
docker build -t ${{env.IMAGE_NAME}} .
32+
docker push ${{env.IMAGE_NAME}}
33+
34+
- name: Deploy to Azure
35+
uses: azure/webapps-deploy@v3
36+
with:
37+
app-name: ${{ secrets.AZURE_APP_NAME }}
38+
publish-profile: ${{ secrets.AZURE_PUBLISH_PROFILE }}
39+
images: ${{env.IMAGE_NAME}}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
node_modules
2+
dist
3+
coverage
4+
.awcache
5+
test-report.*
6+
junit.xml
7+
*.log
8+
*.orig
9+
.awcache
10+
.env
11+
server/public
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"singleQuote": true,
3+
"trailingComma": "es5",
4+
"endOfLine": "lf"
5+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
FROM node:22-alpine AS base
2+
RUN mkdir -p /usr/app
3+
WORKDIR /usr/app
4+
5+
# Prepare static files
6+
FROM base AS build-front
7+
COPY ./ ./
8+
RUN npm ci
9+
RUN npm run build
10+
11+
# Release
12+
FROM base AS release
13+
ENV STATIC_FILES_PATH=./public
14+
COPY --from=build-front /usr/app/dist $STATIC_FILES_PATH
15+
COPY ./server/package.json ./
16+
COPY ./server/package-lock.json ./
17+
COPY ./server/index.js ./
18+
RUN npm ci --omit=dev
19+
20+
CMD ["node", "index.js"]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/// <reference types="vitest/globals" />
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { defineConfig } from 'vitest/config';
2+
import { fileURLToPath } from 'node:url';
3+
4+
export default defineConfig({
5+
test: {
6+
globals: true,
7+
restoreMocks: true,
8+
environment: 'jsdom',
9+
setupFiles: ['./config/test/setup.ts'],
10+
alias: {
11+
'@': fileURLToPath(new URL('../../src', import.meta.url)),
12+
},
13+
},
14+
});

0 commit comments

Comments
 (0)