Fix Dockerfile paths and update build context in docker-compose.yml

This commit is contained in:
Nicola
2026-06-25 08:35:09 +02:00
parent c1f62f507f
commit b13145d0ad
2 changed files with 13 additions and 5 deletions
+2 -2
View File
@@ -1,8 +1,8 @@
services: services:
tennis-roots: tennis-roots:
build: build:
context: ./server context: .
dockerfile: Dockerfile dockerfile: server/Dockerfile
container_name: ${CONTAINER_NAME:-tennis-roots} container_name: ${CONTAINER_NAME:-tennis-roots}
restart: unless-stopped restart: unless-stopped
security_opt: security_opt:
+11 -3
View File
@@ -1,15 +1,23 @@
# ---- Build ---- # ---- Build ----
FROM node:22-alpine AS builder FROM node:22-alpine AS builder
WORKDIR /app WORKDIR /app
COPY package.json package-lock.json ./ COPY server/package.json server/package-lock.json ./
RUN npm ci --omit=dev RUN npm ci --omit=dev
# ---- Run ---- # ---- Run ----
FROM node:22-alpine FROM node:22-alpine
WORKDIR /app WORKDIR /app
# Dipendenze
COPY --from=builder /app/node_modules ./node_modules COPY --from=builder /app/node_modules ./node_modules
COPY index.js ./
# Server
COPY server/index.js ./server/
# Static files
COPY overlay/ ./overlay/
COPY controller/ ./controller/
EXPOSE 3000 EXPOSE 3000
USER node USER node
CMD ["node", "index.js"] CMD ["node", "server/index.js"]