Adiciona estrutura inicial do projeto NestJS com Docker, incluindo Dockerfile, docker-compose, scripts de deploy e configuração do Nginx.

This commit is contained in:
2026-04-17 23:19:27 -05:00
parent 2e76495db8
commit 80d25b2db7
8 changed files with 437 additions and 1 deletions

32
Dockerfile Normal file
View File

@@ -0,0 +1,32 @@
FROM node:20-alpine
# Install system deps
RUN apk add --no-cache \
nginx \
git \
bash \
curl \
openssl
# Install PM2 globally
RUN npm install -g pm2
# Create directories
RUN mkdir -p /home/deploy/projects \
/home/deploy/scripts \
/etc/nginx/sites-dynamic \
/var/log/nginx \
/run/nginx
# Copy scripts
COPY scripts/ /home/deploy/scripts/
RUN chmod +x /home/deploy/scripts/*.sh
# Copy nginx base config
COPY nginx/nginx.conf /etc/nginx/nginx.conf
WORKDIR /home/deploy
EXPOSE 80
CMD ["/home/deploy/scripts/start.sh"]