Compare commits
2 commits
bfa5372ce4
...
acfec04173
Author | SHA1 | Date | |
---|---|---|---|
acfec04173 | |||
86de126b41 |
5 changed files with 70 additions and 3 deletions
12
ui/.containerignore
Normal file
12
ui/.containerignore
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
*
|
||||||
|
!Caddyfile
|
||||||
|
!package*.json
|
||||||
|
!postcss.config.js
|
||||||
|
!tailwind.config.js
|
||||||
|
!env.d..ts
|
||||||
|
!vite.config.ts
|
||||||
|
!tsconfig.json
|
||||||
|
!tsconfig.node.json
|
||||||
|
!index.html
|
||||||
|
!public/
|
||||||
|
!src/
|
11
ui/Caddyfile
Normal file
11
ui/Caddyfile
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{$SITE_ADDRESS} {
|
||||||
|
basicauth * {
|
||||||
|
{$AUTH_PASSWORD} {$AUTH_PASSWORD}
|
||||||
|
}
|
||||||
|
|
||||||
|
encode zstd gzip
|
||||||
|
|
||||||
|
root * /app
|
||||||
|
try_files {path} /index.html
|
||||||
|
file_server
|
||||||
|
}
|
16
ui/Containerfile
Normal file
16
ui/Containerfile
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
FROM docker.io/node:18-slim AS build
|
||||||
|
WORKDIR /app
|
||||||
|
COPY ./package* .
|
||||||
|
RUN npm ci
|
||||||
|
COPY . .
|
||||||
|
RUN npm run build-only
|
||||||
|
|
||||||
|
FROM docker.io/caddy:2-alpine
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
COPY ./Caddyfile /
|
||||||
|
COPY --from=build /app/dist /app
|
||||||
|
|
||||||
|
EXPOSE 80
|
||||||
|
|
||||||
|
CMD ["caddy", "run", "--config", "/Caddyfile"]
|
31
ui/build.sh
Executable file
31
ui/build.sh
Executable file
|
@ -0,0 +1,31 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
REPO="git.hhhammer.de/hamburghammer/dchat-ui"
|
||||||
|
AUTHORS="Augusto Dwenger J. <dwenger@posteo.de>"
|
||||||
|
URL="https://${REPO}"
|
||||||
|
VENDOR="hamburghammer"
|
||||||
|
TITLE="dchat-ui"
|
||||||
|
DESCRIPTION="The Web-UI for dchat a Discord bot to chat with ChatGPT from OpenAI"
|
||||||
|
CREATED=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
|
||||||
|
REVISION=$(git rev-parse HEAD)
|
||||||
|
|
||||||
|
IMAGE_LATEST="${REPO}:latest"
|
||||||
|
|
||||||
|
# shellcheck disable=SC2086
|
||||||
|
podman build \
|
||||||
|
$DOCKER_BUILD_ARGS \
|
||||||
|
-t $IMAGE_LATEST \
|
||||||
|
--label "org.opencontainers.image.revision=${REVISION}" \
|
||||||
|
--label "org.opencontainers.image.version=${TAG}" \
|
||||||
|
--label "org.opencontainers.image.authors=${AUTHORS}" \
|
||||||
|
--label "org.opencontainers.image.created=${CREATED}" \
|
||||||
|
--label "org.opencontainers.image.source=${URL}" \
|
||||||
|
--label "org.opencontainers.image.vendor=${VENDOR}" \
|
||||||
|
--label "org.opencontainers.image.title=${TITLE}" \
|
||||||
|
--label "org.opencontainers.image.description=${DESCRIPTION}" \
|
||||||
|
. || exit $?
|
||||||
|
|
||||||
|
if [ "$PUSH_LATEST" == "1" ]; then
|
||||||
|
podman push "${IMAGE_LATEST}"
|
||||||
|
fi
|
||||||
|
|
|
@ -1,14 +1,11 @@
|
||||||
import { createApp } from 'vue'
|
import { createApp } from 'vue'
|
||||||
import { createPinia } from 'pinia'
|
|
||||||
import App from '@/App.vue'
|
import App from '@/App.vue'
|
||||||
import router from './router'
|
import router from './router'
|
||||||
|
|
||||||
import './assets/main.css'
|
import './assets/main.css'
|
||||||
|
|
||||||
const pinia = createPinia()
|
|
||||||
const app = createApp(App)
|
const app = createApp(App)
|
||||||
|
|
||||||
app.use(pinia)
|
|
||||||
app.use(router)
|
app.use(router)
|
||||||
|
|
||||||
app.mount('#app')
|
app.mount('#app')
|
||||||
|
|
Loading…
Reference in a new issue