ci couchdb
Deploy service couchdb / service couchdb (push) Failing after 9s

This commit is contained in:
2024-12-03 11:49:01 +02:00
parent 2eaa3e9b52
commit d327c1020e
3 changed files with 61 additions and 7 deletions
@@ -0,0 +1,47 @@
name: Deploy service couchdb
run-name: ${{ github.actor }} deployed to build branch
on:
push:
branches:
- main
paths:
- 'services/couchdb/**'
- '.gitea/workflows/deploy-service-couchdb.yaml'
jobs:
service couchdb:
runs-on: ubuntu-latest
container:
volumes:
- /www/hereconnect.condev.ru:/www/hereconnect.condev.ru
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
- name: build docker image
run: |
docker build --file services/couchdb/Dockerfile -t hereconnect/service-couchdb:${{env.GITHUB_SHA}} services/couchdb
- name: start container
env:
COUCHDB_TAG: ${{ env:GITHUB_SHA }}
COUCHDB_USER: ${{ secrets.COUCHDB_USER }}
COUCHDB_PASSWORD: ${{ secrets.COUCHDB_PASSWORD }}
run: |
docker compose -p hereconnect up --pull never
docker tag hereconnect/service-couchdb:${{env.GITHUB_SHA}} hereconnect/service-couchdb:latest
- name: Rollback on Failure
if: failure()
env:
COUCHDB_TAG: latest
run: docker compose -p hereconnect up --pull never
- name: cleanup docker image
if: always()
run: docker rmi hereconnect/service-couchdb:${{env.GITHUB_SHA}}
+10 -6
View File
@@ -1,15 +1,16 @@
services: services:
couchdb: couchdb:
image: couchdb:latest image: hereconnect/service-couchdb:${COUCHDB_TAG:-latest}
env_file:
- couchdb.env
ports: ports:
- "127.0.0.1:5984:5984" - "127.0.0.1:15984:5984"
volumes: volumes:
- ./services/couchdb/data:/opt/couchdb/data - couchdb_data:/opt/couchdb/data
- ./services/couchdb/config:/opt/couchdb/etc/local.d
environment:
- COUCHDB_USER=${COUCHDB_USER}
- COUCHDB_PASSWORD=${COUCHDB_PASSWORD}
restart: unless-stopped restart: unless-stopped
@@ -18,3 +19,6 @@ services:
options: options:
max-size: "100m" max-size: "100m"
max-file: "10" max-file: "10"
volumes:
couchdb_data:
+3
View File
@@ -0,0 +1,3 @@
FROM couchdb:latest
COPY ./config/* /opt/couchdb/etc/local.d/*