ugh its alpine
All checks were successful
Deploy Encrypted Todo App / build-and-push (push) Successful in 4m24s

This commit is contained in:
2025-06-16 10:17:18 -06:00
parent 638c9c7197
commit 7f4bb14b18
2 changed files with 34 additions and 4 deletions

View File

@ -1,7 +1,14 @@
FROM node:24-alpine
FROM node:24-slim
WORKDIR /app
RUN apt-get update && apt-get install -y \
python3 \
make \
g++ \
libc6 \
&& rm -rf /var/lib/apt/lists/*
# Copy dependency files first for better caching
COPY package.json package-lock.json ./

View File

@ -1,9 +1,32 @@
version: "3.8"
services:
app:
image: ${IMAGE}
build:
context: .
dockerfile: Dockerfile
ports:
- "${APP_PORT}:3000"
- "${APP_PORT:-3000}:3000"
environment:
NODE_ENV: production
SQLITE_DB_PATH: ${SQLITE_DB_PATH}
SQLITE_DB_PATH: /app/data/db.db
APP_PORT: 3000
volumes:
- ./data:/app/data
restart: unless-stopped
healthcheck:
test:
[
"CMD",
"node",
"-e",
"const http = require('http'); const req = http.request({hostname: 'localhost', port: 3000, path: '/api/users', method: 'GET'}, (res) => { process.exit(res.statusCode === 200 ? 0 : 1); }); req.on('error', () => process.exit(1)); req.end();",
]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
volumes:
data:
driver: local