diff --git a/.gitea/workflows/main.yaml b/.gitea/workflows/main.yaml index 867f18c..a0e8c59 100644 --- a/.gitea/workflows/main.yaml +++ b/.gitea/workflows/main.yaml @@ -41,4 +41,7 @@ jobs: run: bun docker:website - name: Build and Push API - run: bun docker:api \ No newline at end of file + run: bun docker:api + + - name: Build and Push App + run: bun docker:app \ No newline at end of file diff --git a/apps/app/tsconfig.tsbuildinfo b/apps/app/tsconfig.tsbuildinfo new file mode 100644 index 0000000..2a4ef04 --- /dev/null +++ b/apps/app/tsconfig.tsbuildinfo @@ -0,0 +1 @@ +{"root":["./src/main.tsx","./src/routeTree.gen.ts","./src/vite-env.d.ts","./src/routes/__root.tsx","./src/routes/about.lazy.tsx","./src/routes/index.lazy.tsx"],"version":"5.6.2"} \ No newline at end of file diff --git a/apps/app/vite.config.ts b/apps/app/vite.config.ts index 0e26ecd..190798d 100644 --- a/apps/app/vite.config.ts +++ b/apps/app/vite.config.ts @@ -4,5 +4,9 @@ import { defineConfig } from 'vite' // https://vitejs.dev/config/ export default defineConfig({ + build: { + outDir: '../../build/app', + emptyOutDir: true, + }, plugins: [TanStackRouterVite(), react()], }) diff --git a/ci/docker/app/Dockerfile b/ci/docker/app/Dockerfile new file mode 100644 index 0000000..22f4243 --- /dev/null +++ b/ci/docker/app/Dockerfile @@ -0,0 +1,4 @@ +FROM nginx:alpine AS runtime +COPY ./ci/docker/app/nginx.conf /etc/nginx/nginx.conf +COPY ./build/app /usr/share/nginx/html +EXPOSE 80 \ No newline at end of file diff --git a/ci/docker/app/nginx.conf b/ci/docker/app/nginx.conf new file mode 100644 index 0000000..7eb11e5 --- /dev/null +++ b/ci/docker/app/nginx.conf @@ -0,0 +1,31 @@ +worker_processes 1; + +events { + worker_connections 1024; +} + +http { + server { + listen 80; + server_name _; + + root /usr/share/nginx/html; + index index.html index.htm; + include /etc/nginx/mime.types; + + gzip on; + gzip_min_length 1000; + gzip_proxied expired no-cache no-store private auth; + gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript; + + error_page 404 /404.html; + location = /404.html { + root /usr/share/nginx/html; + internal; + } + + location / { + try_files $uri $uri/index.html =404; + } + } +} \ No newline at end of file diff --git a/package.json b/package.json index 4a1637b..0cff669 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,10 @@ "docker:website": "bun docker:website:build && bun docker:website:push", "docker:api:build": "docker build -t git.hashdot.co/boring.tools/boring.tools/api -f ci/docker/api/Dockerfile .", "docker:api:push": "docker push git.hashdot.co/boring.tools/boring.tools/api", - "docker:api": "bun docker:api:build && bun docker:api:push" + "docker:api": "bun docker:api:build && bun docker:api:push", + "docker:app:build": "docker build -t git.hashdot.co/boring.tools/boring.tools/app -f ci/docker/app/Dockerfile .", + "docker:app:push": "docker push git.hashdot.co/boring.tools/boring.tools/app", + "docker:app": "bun docker:app:build && bun docker:app:push" }, "packageManager": "bun@1.1.29", "workspaces": [