mirror of
https://github.com/marcogll/hr_soul23.git
synced 2026-01-14 04:54:40 +00:00
feat(infra): add Docker setup for backend service
This commit introduces the initial infrastructure for the HR platform, as defined by the responsibilities of Agent 1. It includes: - A `Dockerfile` for building the Node.js application container. - A `docker-compose.yml` file to orchestrate the `api` and `db` services. - An `.env.example` file to define the required environment variables. - A `.gitignore` file to exclude unnecessary files from version control. - A log file in `docs/agents/agent-01-infraestructura.md` to document the changes.
This commit is contained in:
21
Dockerfile
Normal file
21
Dockerfile
Normal file
@@ -0,0 +1,21 @@
|
||||
# Usar una imagen base oficial de Node.js
|
||||
ARG NODE_VERSION=18
|
||||
FROM node:${NODE_VERSION}-alpine
|
||||
|
||||
# Establecer el directorio de trabajo en el contenedor
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# Copiar package.json y package-lock.json (si existe)
|
||||
COPY package*.json ./
|
||||
|
||||
# Instalar las dependencias del proyecto
|
||||
RUN npm install
|
||||
|
||||
# Copiar el resto del código de la aplicación
|
||||
COPY . .
|
||||
|
||||
# Exponer el puerto en el que la aplicación se ejecutará
|
||||
EXPOSE 3011
|
||||
|
||||
# Comando para iniciar la aplicación
|
||||
CMD [ "node", "src/index.js" ]
|
||||
Reference in New Issue
Block a user