ugh its alpine
All checks were successful
Deploy Encrypted Todo App / build-and-push (push) Successful in 4m24s
All checks were successful
Deploy Encrypted Todo App / build-and-push (push) Successful in 4m24s
This commit is contained in:
@ -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 ./
|
||||
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user