Merge branch 'main' of http://10.9.0.0/ttc/micro-frontend
This commit is contained in:
@@ -15,22 +15,41 @@ jobs:
|
||||
sudo apt update && sudo apt install nodejs npm curl -y
|
||||
- name: Install project dependencies
|
||||
run: |
|
||||
(
|
||||
cd accounting-ng-nuttakit
|
||||
npm install --force --legacy-peer-deps --include=dev
|
||||
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: |
|
||||
(
|
||||
cd accounting-ng-nuttakit
|
||||
# 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
|
||||
)
|
||||
(
|
||||
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
|
||||
run: |
|
||||
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=ttc-frontend:latest --format="{{.ID}}"))
|
||||
set -e
|
||||
docker image rm -f 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:
|
||||
runs-on: host
|
||||
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