refactor: rename site to frontend
6
.github/workflows/ci.yml
vendored
@@ -26,17 +26,17 @@ jobs:
|
||||
|
||||
- name: Install frontend dependencies
|
||||
run: |
|
||||
cd site
|
||||
cd frontend
|
||||
bun install
|
||||
|
||||
- name: Build frontend
|
||||
run: |
|
||||
cd site
|
||||
cd frontend
|
||||
bun run build
|
||||
|
||||
- name: Copy frontend
|
||||
run: |
|
||||
cp -r site/dist internal/assets/dist
|
||||
cp -r frontend/dist internal/assets/dist
|
||||
|
||||
- name: Run tests
|
||||
run: go test -v ./...
|
||||
|
||||
@@ -29,7 +29,7 @@ go mod tidy
|
||||
You also need to download the frontend dependencies, this can be done like so:
|
||||
|
||||
```sh
|
||||
cd site/
|
||||
cd frontend/
|
||||
bun install
|
||||
```
|
||||
|
||||
|
||||
28
Dockerfile
@@ -1,22 +1,22 @@
|
||||
# Site builder
|
||||
FROM oven/bun:1.1.45-alpine AS site-builder
|
||||
FROM oven/bun:1.1.45-alpine AS frontend-builder
|
||||
|
||||
WORKDIR /site
|
||||
WORKDIR /frontend
|
||||
|
||||
COPY ./site/package.json ./
|
||||
COPY ./site/bun.lockb ./
|
||||
COPY ./frontend/package.json ./
|
||||
COPY ./frontend/bun.lockb ./
|
||||
|
||||
RUN bun install
|
||||
|
||||
COPY ./site/public ./public
|
||||
COPY ./site/src ./src
|
||||
COPY ./site/eslint.config.js ./
|
||||
COPY ./site/index.html ./
|
||||
COPY ./site/tsconfig.json ./
|
||||
COPY ./site/tsconfig.app.json ./
|
||||
COPY ./site/tsconfig.node.json ./
|
||||
COPY ./site/vite.config.ts ./
|
||||
COPY ./site/postcss.config.cjs ./
|
||||
COPY ./frontend/public ./public
|
||||
COPY ./frontend/src ./src
|
||||
COPY ./frontend/eslint.config.js ./
|
||||
COPY ./frontend/index.html ./
|
||||
COPY ./frontend/tsconfig.json ./
|
||||
COPY ./frontend/tsconfig.app.json ./
|
||||
COPY ./frontend/tsconfig.node.json ./
|
||||
COPY ./frontend/vite.config.ts ./
|
||||
COPY ./frontend/postcss.config.cjs ./
|
||||
|
||||
RUN bun run build
|
||||
|
||||
@@ -33,7 +33,7 @@ RUN go mod download
|
||||
COPY ./main.go ./
|
||||
COPY ./cmd ./cmd
|
||||
COPY ./internal ./internal
|
||||
COPY --from=site-builder /site/dist ./internal/assets/dist
|
||||
COPY --from=frontend-builder /frontend/dist ./internal/assets/dist
|
||||
|
||||
RUN CGO_ENABLED=0 go build -ldflags "-s -w"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div align="center">
|
||||
<img alt="Tinyauth" title="Tinyauth" width="256" src="site/public/logo.png">
|
||||
<img alt="Tinyauth" title="Tinyauth" width="256" src="frontend/public/logo.png">
|
||||
<h1>Tinyauth</h1>
|
||||
<p>The easiest way to secure your apps with a login screen.</p>
|
||||
</div>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
},
|
||||
"timestamp": "2025-03-10T19:00:00.000Z",
|
||||
"thumbnail": {
|
||||
"url": "https://github.com/steveiliop56/tinyauth/blob/main/site/public/logo.png?raw=true"
|
||||
"url": "https://github.com/steveiliop56/tinyauth/blob/main/frontend/public/logo.png?raw=true"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
files:
|
||||
[
|
||||
{
|
||||
"source": "/site/src/lib/i18n/locales/en.json",
|
||||
"translation": "/site/src/lib/i18n/locales/%locale%.json",
|
||||
"source": "/frontend/src/lib/i18n/locales/en.json",
|
||||
"translation": "/frontend/src/lib/i18n/locales/%locale%.json",
|
||||
},
|
||||
]
|
||||
|
||||
@@ -21,9 +21,9 @@ services:
|
||||
container_name: tinyauth-frontend
|
||||
build:
|
||||
context: .
|
||||
dockerfile: site/Dockerfile.dev
|
||||
dockerfile: frontend/Dockerfile.dev
|
||||
volumes:
|
||||
- ./site/src:/site/src
|
||||
- ./frontend/src:/frontend/src
|
||||
ports:
|
||||
- 5173:5173
|
||||
labels:
|
||||
|
||||
0
site/.gitignore → frontend/.gitignore
vendored
23
frontend/Dockerfile.dev
Normal file
@@ -0,0 +1,23 @@
|
||||
FROM oven/bun:1.1.45-alpine
|
||||
|
||||
WORKDIR /frontend
|
||||
|
||||
COPY ./frontend/package.json ./
|
||||
COPY ./frontend/bun.lockb ./
|
||||
|
||||
RUN bun install
|
||||
|
||||
COPY ./frontend/public ./public
|
||||
COPY ./frontend/src ./src
|
||||
|
||||
COPY ./frontend/eslint.config.js ./
|
||||
COPY ./frontend/index.html ./
|
||||
COPY ./frontend/tsconfig.json ./
|
||||
COPY ./frontend/tsconfig.app.json ./
|
||||
COPY ./frontend/tsconfig.node.json ./
|
||||
COPY ./frontend/vite.config.ts ./
|
||||
COPY ./frontend/postcss.config.cjs ./
|
||||
|
||||
EXPOSE 5173
|
||||
|
||||
ENTRYPOINT ["bun", "run", "dev"]
|
||||
@@ -6,7 +6,7 @@
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
|
||||
<link rel="manifest" href="/site.webmanifest" />
|
||||
<link rel="manifest" href="/frontend.webmanifest" />
|
||||
<title>Tinyauth</title>
|
||||
</head>
|
||||
<body>
|
||||
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"name": "site",
|
||||
"name": "frontend",
|
||||
"version": "0.0.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "site",
|
||||
"name": "frontend",
|
||||
"version": "0.0.0",
|
||||
"dependencies": {
|
||||
"@mantine/core": "^7.16.0",
|
||||
@@ -2246,4 +2246,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "site",
|
||||
"name": "frontend",
|
||||
"private": true,
|
||||
"version": "0.0.0",
|
||||
"type": "module",
|
||||
@@ -42,4 +42,4 @@
|
||||
"typescript-eslint": "^8.18.2",
|
||||
"vite": "^6.0.5"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 602 B After Width: | Height: | Size: 602 B |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
@@ -1,23 +0,0 @@
|
||||
FROM oven/bun:1.1.45-alpine
|
||||
|
||||
WORKDIR /site
|
||||
|
||||
COPY ./site/package.json ./
|
||||
COPY ./site/bun.lockb ./
|
||||
|
||||
RUN bun install
|
||||
|
||||
COPY ./site/public ./public
|
||||
COPY ./site/src ./src
|
||||
|
||||
COPY ./site/eslint.config.js ./
|
||||
COPY ./site/index.html ./
|
||||
COPY ./site/tsconfig.json ./
|
||||
COPY ./site/tsconfig.app.json ./
|
||||
COPY ./site/tsconfig.node.json ./
|
||||
COPY ./site/vite.config.ts ./
|
||||
COPY ./site/postcss.config.cjs ./
|
||||
|
||||
EXPOSE 5173
|
||||
|
||||
ENTRYPOINT ["bun", "run", "dev"]
|
||||