feat: refactor app ports, add page docker build & push
This commit is contained in:
parent
38ae9ab1f8
commit
a9efaa712d
@ -70,4 +70,7 @@ jobs:
|
||||
run: bun docker:api
|
||||
|
||||
- name: Build and Push App
|
||||
run: bun docker:app
|
||||
run: bun docker:app
|
||||
|
||||
- name: Build and Push Page
|
||||
run: bun docker:page
|
@ -4,6 +4,9 @@ import { defineConfig } from 'vite'
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
server: {
|
||||
port: 4000,
|
||||
},
|
||||
build: {
|
||||
outDir: '../../build/app',
|
||||
emptyOutDir: true,
|
||||
|
@ -12,7 +12,9 @@ export default defineConfig({
|
||||
output: 'server',
|
||||
outDir: '../../build/page',
|
||||
integrations: [react(), tailwind({ nesting: true })],
|
||||
|
||||
server: {
|
||||
port: 4020,
|
||||
},
|
||||
adapter: node({
|
||||
mode: 'standalone',
|
||||
}),
|
||||
|
@ -2,6 +2,9 @@ import starlight from '@astrojs/starlight'
|
||||
import { defineConfig } from 'astro/config'
|
||||
|
||||
export default defineConfig({
|
||||
server: {
|
||||
port: 4010,
|
||||
},
|
||||
outDir: '../../build/website',
|
||||
integrations: [
|
||||
starlight({
|
||||
|
12
ci/docker/page/Dockerfile
Normal file
12
ci/docker/page/Dockerfile
Normal file
@ -0,0 +1,12 @@
|
||||
FROM oven/bun:1
|
||||
|
||||
COPY ./build/page/dist .
|
||||
COPY ./node_modules ./node_modules
|
||||
|
||||
ENV HOST=0.0.0.0
|
||||
ENV PORT=4020
|
||||
|
||||
USER bun
|
||||
EXPOSE 4020/tcp
|
||||
|
||||
ENTRYPOINT [ "bun", "run", "server/entry.mjs" ]
|
@ -20,7 +20,10 @@
|
||||
"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"
|
||||
"docker:app": "bun docker:app:build && bun docker:app:push",
|
||||
"docker:page:build": "docker build -t git.hashdot.co/boring.tools/boring.tools/page -f ci/docker/page/Dockerfile .",
|
||||
"docker:page:push": "docker push git.hashdot.co/boring.tools/boring.tools/page",
|
||||
"docker:page": "bun docker:page:build && bun docker:page:push"
|
||||
},
|
||||
"packageManager": "bun@1.1.29",
|
||||
"workspaces": [
|
||||
|
Loading…
Reference in New Issue
Block a user