feat(app): add docker build
All checks were successful
Build and Push Docker Image / build (push) Successful in 1m56s
All checks were successful
Build and Push Docker Image / build (push) Successful in 1m56s
This commit is contained in:
parent
a9174619d8
commit
8ba086501a
@ -41,4 +41,7 @@ jobs:
|
||||
run: bun docker:website
|
||||
|
||||
- name: Build and Push API
|
||||
run: bun docker:api
|
||||
run: bun docker:api
|
||||
|
||||
- name: Build and Push App
|
||||
run: bun docker:app
|
1
apps/app/tsconfig.tsbuildinfo
Normal file
1
apps/app/tsconfig.tsbuildinfo
Normal file
@ -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"}
|
@ -4,5 +4,9 @@ import { defineConfig } from 'vite'
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
build: {
|
||||
outDir: '../../build/app',
|
||||
emptyOutDir: true,
|
||||
},
|
||||
plugins: [TanStackRouterVite(), react()],
|
||||
})
|
||||
|
4
ci/docker/app/Dockerfile
Normal file
4
ci/docker/app/Dockerfile
Normal file
@ -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
|
31
ci/docker/app/nginx.conf
Normal file
31
ci/docker/app/nginx.conf
Normal file
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
@ -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": [
|
||||
|
Loading…
Reference in New Issue
Block a user