Compare commits

..

No commits in common. "publish" and "master" have entirely different histories.

9 changed files with 14 additions and 77 deletions

0
176
View File

14
Dockerfile Normal file
View File

@ -0,0 +1,14 @@
FROM node:13.14.0-alpine3.10
WORKDIR /home/app/app
COPY build public
COPY ./server.js ./server.js
COPY ./server.package.json ./package.json
ENV PORT=8000
RUN npm install express
CMD npm run start
EXPOSE 8000

View File

@ -1,20 +0,0 @@
# Use Image Node Alpine For Build
FROM node:13.14.0-alpine3.10
# Default Working Directory
WORKDIR /home/app/app
# Copy Build Directory To Public Directory in Docker
COPY build public
# Copy server.js To server , we open server from here
COPY ./dockers/server.js ./server.js
# Copy package.json for server to docker package json
COPY ./dockers/server.package.json ./package.json
# install express , for open server
RUN npm install express

View File

@ -1,54 +0,0 @@
#!/bin/sh
echo $PWD
while read oldrev newrev ref
do
CURRENT_BRANCH=`echo $ref | cut -d/ -f3`
done
TARGET="/home/git/pub/test_react_hook"
TEMP="/home/git/tmp/test_react_hook"
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
HEROKU_APP_NAME="react-host-test"
API_KEY=d282975b-22ba-48f1-9bbe-a1a22bec5543
echo "Current Branch : $CURRENT_BRANCH"
if [ CURRENT_BRANCH != "publish" ]
then
echo "Not Publish"
exit;
fi
cd ..
REPO="$PWD/test_react_hook.git"
mkdir -p $TEMP
git --work-tree=$TEMP --git-dir=$REPO checkout -f
cd $TEMP
echo "Start Install Project Dependencies"
yarn install
echo "Start Building Project"
yarn build
echo "Push Project To Heroku"
echo "-- Start Login Heroku Containers Registry"
HEROKU_API_KEY=$API_KEY heroku container:login
echo "-- Start Push App To Heroku"
HEROKU_API_KEY=$API_KEY heroku container:push -a $HEROKU_APP_NAME web
echo "-- Start Release App on Heroku"
HEROKU_API_KEY=$API_KEY heroku container:release -a $HEROKU_APP_NAME web
echo "-- Infomation "
HEROKU_API_KEY=$API_KEY heroku apps:info -a $HEROKU_APP_NAME
rm -rf $TEMP

0
nothig
View File

View File

@ -3,9 +3,6 @@ import logo from './logo.svg';
import './App.css';
function App() {
return (
<h1>New Docker Build</h1>
)
return (
<h1>HHHHHHHHHHHHHHHHHHHHHHHThis is Docker from hook React My DOCKER Second Time From React HOOK</h1>

0
test14
View File

0
test15
View File