feat(docker): docker-compose.dev — backend+nginx, общий Postgres, миграции в entrypoint

Made-with: Cursor
This commit is contained in:
Константин Лебединский
2026-04-24 20:36:49 +05:00
parent 8ffd104f64
commit 89da5b60b7
8 changed files with 106 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
node_modules
.env
.env.*
*.log
.git
+8
View File
@@ -0,0 +1,8 @@
FROM node:20-alpine
WORKDIR /app
COPY package.json package-lock.json* ./
RUN npm ci
COPY . .
EXPOSE 3001
RUN chmod +x docker-entrypoint.sh
ENTRYPOINT ["./docker-entrypoint.sh"]
+6
View File
@@ -0,0 +1,6 @@
#!/bin/sh
set -e
echo "Running database migrations…"
node src/db/migrate.js
echo "Starting API…"
exec node src/server.js