deploy config

master
SundayEnglish 4 months ago
parent 2021081587
commit 6f561a6981
  1. 28
      Dockerfile
  2. 10
      docker-compose.yml.example
  3. 2
      nginx/conf.d/vhost.conf

@ -1,14 +1,26 @@
# Sử dụng image Node.js chính thức phiên bản 16
FROM node:16
# Set working directory
# Cập nhật hệ thống và cài các công cụ cần thiết
RUN apt-get update && apt-get install -y curl gnupg
# Nếu bạn muốn chuyển về Node.js v14, cần thay FROM node:16 bằng image khác.
# FROM node:14
# Làm sạch cache của apt sau khi cài
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
# Thiết lập thư mục làm việc
WORKDIR /var/www
# get latest nodejs
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -
RUN apt-get install -y nodejs
# Install Yarn
#RUN npm install --global yarn
# COPY src/package*.json ./src/
# Cài đặt dependencies
# RUN cd src && npm install
# Nếu bạn muốn cài Yarn, có thể bỏ comment dòng sau
# RUN npm install --global yarn
#npm install
#RUN bash -c "cd /var/www/src; npm install"
# Nếu bạn cần chạy ứng dụng (bỏ comment nếu cần)
# CMD ["npm", "start"]

@ -1,13 +1,13 @@
version: '3.5'
services:
#Nginx Service
agent-landingpage-nginx:
report-se-web-nginx:
image: nginx:alpine
container_name: agent-landingpage-nginx
container_name: report-se-web-nginx
restart: unless-stopped
tty: true
ports:
- "19995:80"
- "19919:80"
- "19915:443"
volumes:
- ./:/var/www
@ -15,9 +15,9 @@ services:
networks:
- app-network
#Node Service
agent-landingpage-web:
report-se-web:
image: node:16
container_name: agent-landingpage-web
container_name: report-se-web
build:
context: .
dockerfile: ./Dockerfile

@ -1,6 +1,6 @@
server {
listen 80;
server_name se_dev.sundayenglish.com;
server_name report.sundayenglish.com;
index index.html;
error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log;

Loading…
Cancel
Save