HOANGLAOTA 4 months ago
commit 242cfccc5a
  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 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 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 # COPY src/package*.json ./src/
#RUN npm install --global yarn
# 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 # Nếu bạn cần chạy ứng dụng (bỏ comment nếu cần)
#RUN bash -c "cd /var/www/src; npm install" # CMD ["npm", "start"]

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

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

Loading…
Cancel
Save