Commit 6cf25b38 authored by Ken's avatar Ken

add production deploy stage

parent 141a4e7c
node_modules
build
Dockerfile
.dockerignore
.gitignore
.git
*.md
*.txt
*.bat
\ No newline at end of file
FROM node:16-alpine as builder
WORKDIR /app
COPY . .
RUN npm install
# For production
RUN npm run build
FROM nginx:stable
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=builder ./app/build /usr/share/nginx/html
type password.txt| docker login -u leekfsolo --password-stdin
docker-compose down
docker-compose pull
docker-compose up -d
docker logout
version: "3.4"
services:
newssite-fe:
image: leekfsolo/news_site_fe
container_name: news_site_fe
ports:
- "80:80"
restart: unless-stopped
pull_policy: always
server {
listen 80;
location / {
root /usr/share/nginx/html/;
include /etc/nginx/mime.types;
try_files $uri $uri/ /index.html;
}
}
\ No newline at end of file
dckr_pat_so4nqDK9kEBqY6bK-0FN-y799v4
\ No newline at end of file
public/favicon.ico

3.78 KB | W: | H:

public/favicon.ico

90.9 KB | W: | H:

public/favicon.ico
public/favicon.ico
public/favicon.ico
public/favicon.ico
  • 2-up
  • Swipe
  • Onion skin
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head>
<head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" /> <link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" /> <meta name="theme-color" content="#000000" />
<meta <meta name="description" content="Latest VN news, world news, sports, business, opinion, analysis and reviews from MEU Newspaper." />
name="description"
content="Web site created using create-react-app"
/>
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" /> <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!-- <!--
manifest.json provides metadata used when your web app is installed on a manifest.json provides metadata used when your web app is installed on a
...@@ -24,9 +22,10 @@ ...@@ -24,9 +22,10 @@
work correctly both with client-side routing and a non-root public URL. work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`. Learn how to configure a non-root public URL by running `npm run build`.
--> -->
<title>React App</title> <title>MEU Newspaper</title>
</head> </head>
<body>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript> <noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div> <div id="root"></div>
<!-- <!--
...@@ -39,5 +38,6 @@ ...@@ -39,5 +38,6 @@
To begin the development, run `npm start` or `yarn start`. To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`. To create a production bundle, use `npm run build` or `yarn build`.
--> -->
</body> </body>
</html> </html>
\ No newline at end of file
type password.txt| docker login -u leekfsolo --password-stdin
docker build -t leekfsolo/news_site_fe -f ./Dockerfile .
docker push leekfsolo/news_site_fe:latest
docker logout
const enviromentConfig = { const enviromentConfig = {
development: { development: {
endPoint: "https://localhost:5001", endPoint: "https://gateway.dev.meu-solutions.com/newspapers",
}, },
production: { production: {
endPoint: "", endPoint: "https://gateway.dev.meu-solutions.com/newspapers",
}, },
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment