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:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
env:
|
||||
COUCHDB_USER: ${{secrets.COUCHDB_USER}}
|
||||
COUCHDB_PASSWORD: ${{secrets.COUCHDB_PASSWORD}}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
@@ -20,9 +24,6 @@ jobs:
|
||||
run: COUCHDB_TAG=${{env.GITHUB_SHA}} docker compose -p hereconnect build couchdb
|
||||
|
||||
- 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
|
||||
|
||||
- name: rename to latest
|
||||
|
||||
@@ -13,6 +13,10 @@ jobs:
|
||||
db-migrations:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
env:
|
||||
COUCHDB_USER: ${{secrets.COUCHDB_USER}}
|
||||
COUCHDB_PASSWORD: ${{secrets.COUCHDB_PASSWORD}}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@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
|
||||
|
||||
- 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
|
||||
|
||||
|
||||
|
||||
@@ -14,6 +14,10 @@ jobs:
|
||||
service message-delivery-method-web-push:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
env:
|
||||
COUCHDB_USER: ${{secrets.COUCHDB_USER}}
|
||||
COUCHDB_PASSWORD: ${{secrets.COUCHDB_PASSWORD}}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@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
|
||||
|
||||
- name: build docker image
|
||||
run: |
|
||||
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
|
||||
run: MESSAGE_DELIVERY_METHOD_WEB_PUSH_TAG=${{env.GITHUB_SHA}} docker compose -p hereconnect build message-delivery-method-web-push
|
||||
|
||||
- name: start container
|
||||
# tag latest
|
||||
run: |
|
||||
docker tag hereconnect/service-message-delivery-method-web-push:${{env.GITHUB_SHA}} hereconnect/service-message-delivery-method-web-push:latest
|
||||
run: MESSAGE_DELIVERY_METHOD_WEB_PUSH_TAG=${{env.GITHUB_SHA}} docker compose -p hereconnect up -d --pull never message-delivery-method-web-push
|
||||
|
||||
- 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()
|
||||
run: |
|
||||
docker rmi hereconnect/service-message-delivery-method-web-push:${{env.GITHUB_SHA}}
|
||||
run: docker rmi hereconnect/service-couchdb:${{env.GITHUB_SHA}}
|
||||
|
||||
+19
-4
@@ -4,16 +4,12 @@ services:
|
||||
image: hereconnect/service-couchdb:${COUCHDB_TAG:-latest}
|
||||
ports:
|
||||
- "127.0.0.1:5984:5984"
|
||||
|
||||
volumes:
|
||||
- couchdb_data:/opt/couchdb/data
|
||||
|
||||
environment:
|
||||
- COUCHDB_USER=${COUCHDB_USER}
|
||||
- COUCHDB_PASSWORD=${COUCHDB_PASSWORD}
|
||||
|
||||
restart: unless-stopped
|
||||
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
@@ -30,6 +26,25 @@ services:
|
||||
depends_on:
|
||||
- couchdb
|
||||
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:
|
||||
couchdb_data:
|
||||
|
||||
@@ -22,6 +22,8 @@ function limitStringLengthWithEllipsis(str: string, maxLength: number): string {
|
||||
}
|
||||
|
||||
const start = async () => {
|
||||
console.log('API_URL', process.env.API_URL);
|
||||
|
||||
await setupVapidDetails();
|
||||
const serviceSeqTracker = await ServiceSeqTracker.Init(
|
||||
"_local/service:message-delivery-method-web-push",
|
||||
|
||||
Reference in New Issue
Block a user