docker deploy

This commit is contained in:
artie 2025-02-22 17:52:37 +01:00
parent 135da4b876
commit ef9db12cb8
5 changed files with 28 additions and 19 deletions

3
.dockerignore Normal file
View File

@ -0,0 +1,3 @@
node_modules
.git
.gitignore

11
Dockerfile Normal file
View File

@ -0,0 +1,11 @@
FROM oven/bun:1-alpine
WORKDIR /app
COPY package.json bun.lock ./
RUN bun install --frozen-lockfile --production
COPY . .
CMD ["bun", "start"]

13
compose.yaml Normal file
View File

@ -0,0 +1,13 @@
services:
app:
build: .
restart: unless-stopped
network_mode: host
logging:
driver: journald
options:
tag: artemis
volumes:
- ./data/temp:/app/data/temp
environment:
- NODE_ENV=production

View File

@ -1,14 +0,0 @@
module.exports = {
apps: [
{
name: "artemis",
interpreter: "bun",
script: "src/index.ts",
time: true,
env: {
NODE_ENV: "production",
PATH: `${process.env.HOME}/.bun/bin:${process.env.PATH}`,
},
},
],
};

View File

@ -1,10 +1,6 @@
ssh lia " ssh lia "
set -e set -e
export PATH=\"\$HOME/.local/share/pnpm:\$PATH\"
eval \"\`\$HOME/.local/share/fnm/fnm env --shell=bash\`\"
cd artemis.js cd artemis.js
git pull git pull
~/.bun/bin/bun install --frozen-lockfile docker compose up -d --build
pm2 restart artemis
" "