Workflow: added ng-ttc-frontend
Signed-off-by: supphakitd <67319010028@technictrang.ac.th>
This commit is contained in:
@@ -15,22 +15,41 @@ jobs:
|
|||||||
sudo apt update && sudo apt install nodejs npm curl -y
|
sudo apt update && sudo apt install nodejs npm curl -y
|
||||||
- name: Install project dependencies
|
- name: Install project dependencies
|
||||||
run: |
|
run: |
|
||||||
|
(
|
||||||
cd accounting-ng-nuttakit
|
cd accounting-ng-nuttakit
|
||||||
npm install --force --legacy-peer-deps --include=dev
|
npm install --force --legacy-peer-deps --include=dev
|
||||||
npm install -g @angular/cli
|
npm install -g @angular/cli
|
||||||
- name: Build webapp
|
)
|
||||||
|
(
|
||||||
|
cd ng-ttc-frontend
|
||||||
|
npm install --force --legacy-peer-deps --include=dev
|
||||||
|
npm install -g @angular/cli
|
||||||
|
)
|
||||||
|
- name: Build accounting webapp
|
||||||
run: |
|
run: |
|
||||||
|
(
|
||||||
cd accounting-ng-nuttakit
|
cd accounting-ng-nuttakit
|
||||||
# temporary change api url for development
|
# temporary change api url for development
|
||||||
#sed -i 's@https://api.nuttakit.work@http://10.9.0.0:8080@g' src/environments/environment.ts
|
#sed -i 's@https://api.nuttakit.work@http://10.9.0.0:8080@g' src/environments/environment.ts
|
||||||
ng build
|
ng build
|
||||||
|
)
|
||||||
|
(
|
||||||
|
cd ng-ttc-frontend
|
||||||
|
# temporary change api url for development
|
||||||
|
#sed -i 's@https://api.nuttakit.work@http://10.9.0.0:8080@g' src/environments/environment.ts
|
||||||
|
ng build
|
||||||
|
)
|
||||||
- name: Build docker image
|
- name: Build docker image
|
||||||
run: |
|
run: |
|
||||||
set +e
|
set +e
|
||||||
docker rm $(docker stop $(docker ps -a -q --filter ancestor=accounting-frontend:latest --format="{{.ID}}"))
|
docker rm $(docker stop $(docker ps -a -q --filter ancestor=accounting-frontend:latest --format="{{.ID}}"))
|
||||||
|
docker rm $(docker stop $(docker ps -a -q --filter ancestor=ttc-frontend:latest --format="{{.ID}}"))
|
||||||
set -e
|
set -e
|
||||||
docker image rm -f accounting-frontend:latest
|
docker image rm -f accounting-frontend:latest
|
||||||
docker build . -t accounting-frontend:latest
|
docker build . -t accounting-frontend:latest
|
||||||
|
docker image rm -f ttc-frontend:latest
|
||||||
|
docker build . -f Dockerfile-TTC -t ttc-frontend:latest
|
||||||
|
|
||||||
Restart Docker Compose:
|
Restart Docker Compose:
|
||||||
runs-on: host
|
runs-on: host
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
10
Dockerfile-TTC
Normal file
10
Dockerfile-TTC
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
FROM nginx:alpine
|
||||||
|
|
||||||
|
RUN rm /etc/nginx/conf.d/default.conf
|
||||||
|
|
||||||
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
|
|
||||||
|
ADD ng-ttc-frontend/dist/ng-ttc-frontend/browser /usr/share/nginx/html
|
||||||
|
|
||||||
|
EXPOSE 80
|
||||||
|
CMD ["nginx", "-g", "daemon off;"]
|
||||||
Reference in New Issue
Block a user