Merge branch 'master' of http://10.9.0.0/ttc/micro-service-api
All checks were successful
Build Docker Image / Build Docker Image (push) Successful in 3m10s
All checks were successful
Build Docker Image / Build Docker Image (push) Successful in 3m10s
# Conflicts: # exthernal-accountingwep-api/.env
This commit is contained in:
@@ -13,15 +13,15 @@ jobs:
|
||||
# change mirror to kku.ac.th for faster package downloading
|
||||
sudo sed -i 's@http://archive.ubuntu.com@http://mirror.kku.ac.th@g' /etc/apt/sources.list.d/ubuntu.sources
|
||||
sudo apt update && sudo apt install nodejs npm curl -y
|
||||
- name: Install project dependencies
|
||||
run: |
|
||||
npm install
|
||||
- name: Testing APIs
|
||||
run: |
|
||||
chmod +x test.sh
|
||||
./test.sh
|
||||
- name: Build docker image
|
||||
run: |
|
||||
mv Dockerfile ../
|
||||
mv entrypoint ../
|
||||
cd ../
|
||||
set +e
|
||||
docker rm $(docker stop $(docker ps -a -q --filter ancestor=accounting-api:latest --format="{{.ID}}"))
|
||||
set -e
|
||||
docker image rm -f accounting-api:latest
|
||||
docker build . -t accounting-api:latest
|
||||
|
||||
|
||||
15
Dockerfile
15
Dockerfile
@@ -5,13 +5,16 @@ RUN chmod +x ./entrypoint
|
||||
|
||||
RUN apk update && apk add npm
|
||||
|
||||
RUN mkdir /server
|
||||
ADD micro-service-api /server
|
||||
|
||||
ADD node_modules /server/node_modules
|
||||
ADD package-lock.json /server/package-lock.json
|
||||
ADD package.json /server/package.json
|
||||
RUN mv /server/start-accountingwep.sh /
|
||||
RUN mv /server/start-login.sh /
|
||||
RUN mv /server/start-ttc.sh /
|
||||
|
||||
ADD exthernal-login-api /server/exthernal-login-api
|
||||
ADD exthernal-ttc-api /server/exthernal-ttc-api
|
||||
RUN chmod +x /start-accountingwep.sh
|
||||
RUN chmod +x /start-login.sh
|
||||
RUN chmod +x /start-ttc.sh
|
||||
|
||||
RUN cd /server && npm install
|
||||
|
||||
ENTRYPOINT ["/entrypoint"]
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
#!/bin/sh
|
||||
cd /server/exthernal-login-api
|
||||
& npm start
|
||||
|
||||
cd /server/exthernal-accountingwep-api
|
||||
& npm start
|
||||
./start-login.sh &
|
||||
./start-ttc.sh &
|
||||
exec ./start-accountingwep.sh
|
||||
@@ -2,7 +2,7 @@
|
||||
PJ_NAME=exthernal-wepaccounting-api
|
||||
|
||||
# database
|
||||
PG_HOST=10.9.0.0
|
||||
PG_HOST=accounting-database
|
||||
PG_USER=postgres
|
||||
PG_PASS=ttc@2026
|
||||
PG_DB=ttc
|
||||
@@ -13,7 +13,7 @@ SMTP_USER=lalisakuty@gmail.com
|
||||
SMTP_PASS=lurl pckw qugk tzob
|
||||
|
||||
# REDIS
|
||||
REDIS_HOST=10.9.0.0
|
||||
REDIS_HOST=redis
|
||||
REDIS_PORT=6379
|
||||
OTP_TTL_SECONDS=300
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import { accountingSetup } from '../controllers/accountingSetupController.js'
|
||||
import { accountingSearch } from '../controllers/accountingSearchController.js'
|
||||
import { accountingSum } from '../controllers/accountingSumController.js'
|
||||
import { accountingAdd } from '../controllers/accountingAddController.js'
|
||||
import { reportController } from '../controllers/ReportController.js'
|
||||
import { reportController } from '../controllers/reportController.js'
|
||||
|
||||
// import { authMiddleware } from '../middlewares/auth.js'
|
||||
// import { sendResponse } from '../utils/response.js'
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
PJ_NAME=exthernal-login-api
|
||||
|
||||
# database
|
||||
PG_HOST=10.9.0.0
|
||||
PG_HOST=accounting-database
|
||||
PG_USER=postgres
|
||||
PG_PASS=ttc@2026
|
||||
PG_DB=ttc
|
||||
@@ -13,7 +13,7 @@ SMTP_USER=lalisakuty@gmail.com
|
||||
SMTP_PASS=lurl pckw qugk tzob
|
||||
|
||||
# REDIS
|
||||
REDIS_HOST=10.9.0.0
|
||||
REDIS_HOST=redis
|
||||
REDIS_PORT=6379
|
||||
OTP_TTL_SECONDS=300
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
PJ_NAME=exthernal-ttc-api
|
||||
|
||||
# database
|
||||
PG_HOST=10.9.0.0
|
||||
PG_HOST=accounting-database
|
||||
PG_USER=postgres
|
||||
PG_PASS=ttc@2026
|
||||
PG_DB=ttc
|
||||
@@ -13,7 +13,7 @@ SMTP_USER=lalisakuty@gmail.com
|
||||
SMTP_PASS=lurl pckw qugk tzob
|
||||
|
||||
# REDIS
|
||||
REDIS_HOST=127.0.0.1
|
||||
REDIS_HOST=redis
|
||||
REDIS_PORT=6379
|
||||
OTP_TTL_SECONDS=300
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import { budgetAdd } from '../controllers/budgetAddController.js'
|
||||
import { projectSearch } from '../controllers/projectSearchController.js'
|
||||
import { projectAdd } from '../controllers/projectAddController.js'
|
||||
import { budgetExpense } from '../controllers/budgetExpenseController.js'
|
||||
import { reportController } from '../controllers/ReportController.js'
|
||||
import { reportController } from '../controllers/reportController.js'
|
||||
import { transactionSearch } from '../controllers/transactionSearchController.js'
|
||||
|
||||
// import { authMiddleware } from '../middlewares/auth.js'
|
||||
|
||||
3
start-accountingwep.sh
Normal file
3
start-accountingwep.sh
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
cd /server/exthernal-accountingwep-api
|
||||
npm start
|
||||
3
start-login.sh
Normal file
3
start-login.sh
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
cd /server/exthernal-login-api
|
||||
npm start
|
||||
3
start-ttc.sh
Normal file
3
start-ttc.sh
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
cd /server/exthernal-ttc-api
|
||||
npm start
|
||||
Reference in New Issue
Block a user