fix ci/cd
Deploy app frontend / app frontend (push) Successful in 1m12s
Deploy service couchdb / service couchdb (push) Successful in 16s
Deploy service message-delivery-method-web-push / service message-delivery-method-web-push (push) Failing after 43s
Deploy db-migrations / db-migrations (push) Successful in 54s
Deploy app frontend / app frontend (push) Successful in 1m12s
Deploy service couchdb / service couchdb (push) Successful in 16s
Deploy service message-delivery-method-web-push / service message-delivery-method-web-push (push) Failing after 43s
Deploy db-migrations / db-migrations (push) Successful in 54s
This commit is contained in:
@@ -13,6 +13,10 @@ jobs:
|
|||||||
service couchdb:
|
service couchdb:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
env:
|
||||||
|
COUCHDB_USER: ${{secrets.COUCHDB_USER}}
|
||||||
|
COUCHDB_PASSWORD: ${{secrets.COUCHDB_PASSWORD}}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
@@ -20,9 +24,6 @@ jobs:
|
|||||||
run: COUCHDB_TAG=${{env.GITHUB_SHA}} docker compose -p hereconnect build couchdb
|
run: COUCHDB_TAG=${{env.GITHUB_SHA}} docker compose -p hereconnect build couchdb
|
||||||
|
|
||||||
- name: start container
|
- name: start container
|
||||||
env:
|
|
||||||
COUCHDB_USER: ${{secrets.COUCHDB_USER}}
|
|
||||||
COUCHDB_PASSWORD: ${{secrets.COUCHDB_PASSWORD}}
|
|
||||||
run: COUCHDB_TAG=${{env.GITHUB_SHA}} docker compose -p hereconnect up -d --pull never couchdb
|
run: COUCHDB_TAG=${{env.GITHUB_SHA}} docker compose -p hereconnect up -d --pull never couchdb
|
||||||
|
|
||||||
- name: rename to latest
|
- name: rename to latest
|
||||||
|
|||||||
@@ -13,6 +13,10 @@ jobs:
|
|||||||
db-migrations:
|
db-migrations:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
env:
|
||||||
|
COUCHDB_USER: ${{secrets.COUCHDB_USER}}
|
||||||
|
COUCHDB_PASSWORD: ${{secrets.COUCHDB_PASSWORD}}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
@@ -28,9 +32,6 @@ jobs:
|
|||||||
run: DB_MIGRATIONS_TAG=${{env.GITHUB_SHA}} docker compose -p hereconnect build db-migrations
|
run: DB_MIGRATIONS_TAG=${{env.GITHUB_SHA}} docker compose -p hereconnect build db-migrations
|
||||||
|
|
||||||
- name: start container
|
- name: start container
|
||||||
env:
|
|
||||||
COUCHDB_USER: ${{secrets.COUCHDB_USER}}
|
|
||||||
COUCHDB_PASSWORD: ${{secrets.COUCHDB_PASSWORD}}
|
|
||||||
run: DB_MIGRATIONS_TAG=${{env.GITHUB_SHA}} docker compose -p hereconnect up --pull never db-migrations
|
run: DB_MIGRATIONS_TAG=${{env.GITHUB_SHA}} docker compose -p hereconnect up --pull never db-migrations
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,10 @@ jobs:
|
|||||||
service message-delivery-method-web-push:
|
service message-delivery-method-web-push:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
env:
|
||||||
|
COUCHDB_USER: ${{secrets.COUCHDB_USER}}
|
||||||
|
COUCHDB_PASSWORD: ${{secrets.COUCHDB_PASSWORD}}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
@@ -31,15 +35,20 @@ jobs:
|
|||||||
pnpm --filter ./services/message-delivery-method-web-push deploy --prod build/service-message-delivery-method-web-push
|
pnpm --filter ./services/message-delivery-method-web-push deploy --prod build/service-message-delivery-method-web-push
|
||||||
|
|
||||||
- name: build docker image
|
- name: build docker image
|
||||||
run: |
|
run: MESSAGE_DELIVERY_METHOD_WEB_PUSH_TAG=${{env.GITHUB_SHA}} docker compose -p hereconnect build message-delivery-method-web-push
|
||||||
docker build --file services/message-delivery-method-web-push/Dockerfile -t hereconnect/service-message-delivery-method-web-push:${{env.GITHUB_SHA}} build/service-message-delivery-method-web-push
|
|
||||||
|
|
||||||
- name: start container
|
- name: start container
|
||||||
# tag latest
|
run: MESSAGE_DELIVERY_METHOD_WEB_PUSH_TAG=${{env.GITHUB_SHA}} docker compose -p hereconnect up -d --pull never message-delivery-method-web-push
|
||||||
run: |
|
|
||||||
docker tag hereconnect/service-message-delivery-method-web-push:${{env.GITHUB_SHA}} hereconnect/service-message-delivery-method-web-push:latest
|
|
||||||
|
|
||||||
- name: cleanup build directories
|
- name: rename to latest
|
||||||
|
run: docker tag hereconnect/message-delivery-method-web-push:${{env.GITHUB_SHA}} hereconnect/message-delivery-method-web-push:latest
|
||||||
|
|
||||||
|
- name: rollback on failure
|
||||||
|
if: failure()
|
||||||
|
env:
|
||||||
|
COUCHDB_TAG: latest
|
||||||
|
run: docker compose -p hereconnect up -d --pull never couchdb
|
||||||
|
|
||||||
|
- name: cleanup docker image
|
||||||
if: always()
|
if: always()
|
||||||
run: |
|
run: docker rmi hereconnect/service-couchdb:${{env.GITHUB_SHA}}
|
||||||
docker rmi hereconnect/service-message-delivery-method-web-push:${{env.GITHUB_SHA}}
|
|
||||||
|
|||||||
+19
-4
@@ -4,16 +4,12 @@ services:
|
|||||||
image: hereconnect/service-couchdb:${COUCHDB_TAG:-latest}
|
image: hereconnect/service-couchdb:${COUCHDB_TAG:-latest}
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:5984:5984"
|
- "127.0.0.1:5984:5984"
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
- couchdb_data:/opt/couchdb/data
|
- couchdb_data:/opt/couchdb/data
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
- COUCHDB_USER=${COUCHDB_USER}
|
- COUCHDB_USER=${COUCHDB_USER}
|
||||||
- COUCHDB_PASSWORD=${COUCHDB_PASSWORD}
|
- COUCHDB_PASSWORD=${COUCHDB_PASSWORD}
|
||||||
|
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
logging:
|
logging:
|
||||||
driver: "json-file"
|
driver: "json-file"
|
||||||
options:
|
options:
|
||||||
@@ -30,6 +26,25 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- couchdb
|
- couchdb
|
||||||
restart: no
|
restart: no
|
||||||
|
logging:
|
||||||
|
driver: "json-file"
|
||||||
|
options:
|
||||||
|
max-size: "10m"
|
||||||
|
max-file: "1"
|
||||||
|
|
||||||
|
message-delivery-method-web-push:
|
||||||
|
image: hereconnect/message-delivery-method-web-push:${MESSAGE_DELIVERY_METHOD_WEB_PUSH_TAG:-latest}
|
||||||
|
build: build/message-delivery-method-web-push
|
||||||
|
environment:
|
||||||
|
- API_URL=http://${COUCHDB_USER}:${COUCHDB_PASSWORD}@couchdb:5984
|
||||||
|
depends_on:
|
||||||
|
- couchdb
|
||||||
|
restart: no
|
||||||
|
logging:
|
||||||
|
driver: "json-file"
|
||||||
|
options:
|
||||||
|
max-size: "100m"
|
||||||
|
max-file: "10"
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
couchdb_data:
|
couchdb_data:
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ function limitStringLengthWithEllipsis(str: string, maxLength: number): string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const start = async () => {
|
const start = async () => {
|
||||||
|
console.log('API_URL', process.env.API_URL);
|
||||||
|
|
||||||
await setupVapidDetails();
|
await setupVapidDetails();
|
||||||
const serviceSeqTracker = await ServiceSeqTracker.Init(
|
const serviceSeqTracker = await ServiceSeqTracker.Init(
|
||||||
"_local/service:message-delivery-method-web-push",
|
"_local/service:message-delivery-method-web-push",
|
||||||
|
|||||||
Reference in New Issue
Block a user