Dockerize
This commit is contained in:
parent
b4452ef25a
commit
0bbe431e62
5 changed files with 39 additions and 4 deletions
2
.dockerignore
Normal file
2
.dockerignore
Normal file
|
@ -0,0 +1,2 @@
|
|||
node_modules/
|
||||
.astro/
|
18
Dockerfile
Normal file
18
Dockerfile
Normal file
|
@ -0,0 +1,18 @@
|
|||
FROM node:21-alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN mkdir -p /var/sqlite
|
||||
|
||||
COPY package.json .
|
||||
|
||||
RUN npm install
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN npm run migrate
|
||||
RUN npm run build
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
CMD ["dist/server/entry.mjs"]
|
|
@ -8,6 +8,9 @@ export default defineConfig({
|
|||
output: "hybrid",
|
||||
integrations: [tailwind()],
|
||||
adapter: node({
|
||||
mode: "standalone"
|
||||
})
|
||||
});
|
||||
mode: "standalone",
|
||||
}),
|
||||
server: {
|
||||
port: 8000,
|
||||
},
|
||||
});
|
||||
|
|
11
compose.yaml
Normal file
11
compose.yaml
Normal file
|
@ -0,0 +1,11 @@
|
|||
services:
|
||||
frontend:
|
||||
build: .
|
||||
ports:
|
||||
- "8000:8000"
|
||||
environment:
|
||||
DATABASE_PATH: /var/sqlite/reset-sender-v2.sqlite
|
||||
volumes:
|
||||
- sqlite_data:/var/sqlite
|
||||
volumes:
|
||||
sqlite_data:
|
|
@ -5,7 +5,8 @@
|
|||
"scripts": {
|
||||
"dev": "astro dev",
|
||||
"start": "astro dev",
|
||||
"build": "astro check && astro build",
|
||||
"check": "astro check --root src",
|
||||
"build": "astro build",
|
||||
"preview": "astro preview",
|
||||
"astro": "astro",
|
||||
"migrate": "node ./scripts/migrate.js"
|
||||
|
|
Reference in a new issue