diff --git a/.gitea/workflows/deploy-app-frontend.yaml b/.gitea/workflows/deploy-app-frontend.yaml index 9b44027..8af2be3 100644 --- a/.gitea/workflows/deploy-app-frontend.yaml +++ b/.gitea/workflows/deploy-app-frontend.yaml @@ -7,6 +7,7 @@ on: paths: - 'apps/frontend/**' - '.gitea/workflows/deploy-app-frontend.yaml' + - 'docker-compose.yml' jobs: app frontend: diff --git a/.gitea/workflows/deploy-service-couchdb.yaml b/.gitea/workflows/deploy-service-couchdb.yaml index 13649af..ce52f39 100644 --- a/.gitea/workflows/deploy-service-couchdb.yaml +++ b/.gitea/workflows/deploy-service-couchdb.yaml @@ -7,6 +7,7 @@ on: paths: - 'services/couchdb/**' - '.gitea/workflows/deploy-service-couchdb.yaml' + - 'docker-compose.yml' jobs: service couchdb: diff --git a/.gitea/workflows/deploy-service-db-migrations.yaml b/.gitea/workflows/deploy-service-db-migrations.yaml index 146b263..e18adbb 100644 --- a/.gitea/workflows/deploy-service-db-migrations.yaml +++ b/.gitea/workflows/deploy-service-db-migrations.yaml @@ -7,6 +7,7 @@ on: paths: - 'services/db-migrations/**' - '.gitea/workflows/deploy-service-db-migrations.yaml' + - 'docker-compose.yml' jobs: db-migrations: diff --git a/.gitea/workflows/deploy-service-message-delivery-method-web-push.yaml b/.gitea/workflows/deploy-service-message-delivery-method-web-push.yaml index aed9ef2..69c8399 100644 --- a/.gitea/workflows/deploy-service-message-delivery-method-web-push.yaml +++ b/.gitea/workflows/deploy-service-message-delivery-method-web-push.yaml @@ -8,6 +8,7 @@ on: - 'services/message-delivery-method-web-push/**' - 'packages/couchdb-changes-stream/**' - '.gitea/workflows/deploy-service-message-delivery-method-web-push.yaml' + - 'docker-compose.yml' jobs: service message-delivery-method-web-push: diff --git a/docker-compose.yml b/docker-compose.yml index f577bdd..13f8ff2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -23,7 +23,7 @@ services: db-migrations: image: hereconnect/service-db-migrations:${DB_MIGRATIONS_TAG:-latest} volumes: - - db_migrations_data:/opt/migrations/data + - db_migrations_data:/opt/db-migrations/data environment: - API_URL=http://${COUCHDB_USER}:${COUCHDB_PASSWORD}@couchdb:5984 depends_on: diff --git a/services/db-migrations/Dockerfile b/services/db-migrations/Dockerfile index 22c40b4..11d03af 100644 --- a/services/db-migrations/Dockerfile +++ b/services/db-migrations/Dockerfile @@ -1,7 +1,9 @@ FROM oven/bun:1.1.38-alpine -VOLUME /opt/migrations/data +WORKDIR /opt/db-migrations + +VOLUME /opt/db-migrations/data COPY . ./ -CMD ["bun", "./node_modules/migrate/bin/migrate", "-f", "/opt/migrations/data/migrations.json"] +CMD ["bun", "./node_modules/migrate/bin/migrate", "up", "--state-file=/opt/db-migrations/data/state.json"]