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:
32
Dockerfile
Normal file
32
Dockerfile
Normal 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"]
|
||||
Reference in New Issue
Block a user