Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.
Refactor postgres docker setup and update docs (#190)
Leendert de Borst17e4f614d89d
diff --git a/.github/workflows/publish-docker-images.yml b/.github/workflows/publish-docker-images.ymlindex a97f950aa..4dee4a89a 100644--- a/.github/workflows/publish-docker-images.yml+++ b/.github/workflows/publish-docker-images.yml@@ -38,6 +38,14 @@ jobs:with:images: ${{ env.REGISTRY }}/${{ env.REPO_LOWER }}+ - name: Build and push Postgres image+ uses: docker/build-push-action@v5+ with:+ context: .+ file: src/Databases/AliasServerDb/Dockerfile+ push: true+ tags: ${{ env.REGISTRY }}/${{ env.REPO_LOWER }}-postgres:latest,${{ env.REGISTRY }}/${{ env.REPO_LOWER }}-postgres:${{ github.ref_name }}+- name: Build and push API imageuses: docker/build-push-action@v5with:@@ -62,6 +70,14 @@ jobs:push: truetags: ${{ env.REGISTRY }}/${{ env.REPO_LOWER }}-admin:latest,${{ env.REGISTRY }}/${{ env.REPO_LOWER }}-admin:${{ github.ref_name }}+ - name: Build and push Reverse Proxy image+ uses: docker/build-push-action@v5+ with:+ context: .+ file: Dockerfile+ push: true+ tags: ${{ env.REGISTRY }}/${{ env.REPO_LOWER }}-reverse-proxy:latest,${{ env.REGISTRY }}/${{ env.REPO_LOWER }}-reverse-proxy:${{ github.ref_name }}+- name: Build and push SMTP imageuses: docker/build-push-action@v5with:@@ -78,14 +94,6 @@ jobs:push: truetags: ${{ env.REGISTRY }}/${{ env.REPO_LOWER }}-task-runner:latest,${{ env.REGISTRY }}/${{ env.REPO_LOWER }}-task-runner:${{ github.ref_name }}- - name: Build and push Reverse Proxy image- uses: docker/build-push-action@v5- with:- context: .- file: Dockerfile- push: true- tags: ${{ env.REGISTRY }}/${{ env.REPO_LOWER }}-reverse-proxy:latest,${{ env.REGISTRY }}/${{ env.REPO_LOWER }}-reverse-proxy:${{ github.ref_name }}-- name: Build and push InstallCli imageuses: docker/build-push-action@v5with:diff --git a/docker-compose.build.yml b/docker-compose.build.ymlindex cd1382bf4..bf873e9cf 100644--- a/docker-compose.build.yml+++ b/docker-compose.build.yml@@ -1,9 +1,9 @@services:- reverse-proxy:- image: aliasvault-reverse-proxy+ postgres:+ image: aliasvault-postgresbuild:context: .- dockerfile: Dockerfile+ dockerfile: src/Databases/AliasServerDb/Dockerfileclient:image: aliasvault-client@@ -23,6 +23,12 @@ services:context: .dockerfile: src/AliasVault.Admin/Dockerfile+ reverse-proxy:+ image: aliasvault-reverse-proxy+ build:+ context: .+ dockerfile: Dockerfile+smtp:image: aliasvault-smtpbuild:@@ -34,9 +40,3 @@ services:build:context: .dockerfile: src/Services/AliasVault.TaskRunner/Dockerfile-- postgres:- image: aliasvault-postgres- build:- context: .- dockerfile: Dockerfile.postgresdiff --git a/docker-compose.yml b/docker-compose.ymlindex 220e5cb09..c4f553e4e 100644--- a/docker-compose.yml+++ b/docker-compose.yml@@ -1,21 +1,17 @@services:- reverse-proxy:- image: ghcr.io/lanedirt/aliasvault-reverse-proxy:latest- ports:- - "${HTTP_PORT:-80}:80"- - "${HTTPS_PORT:-443}:443"+ postgres:+ image: ghcr.io/lanedirt/aliasvault-postgres:latestvolumes:- - ./certificates/ssl:/etc/nginx/ssl:rw- - ./certificates/letsencrypt:/etc/nginx/ssl-letsencrypt:rw- - ./certificates/letsencrypt/www:/var/www/certbot:rw- depends_on:- - admin- - client- - api- - smtp- restart: always+ - ./database/postgres:/var/lib/postgresql/data:rwenv_file:- .env+ restart: always+ healthcheck:+ test: ["CMD-SHELL", "pg_isready -U aliasvault"]+ interval: 5s+ timeout: 5s+ retries: 5+ start_period: 10sclient:image: ghcr.io/lanedirt/aliasvault-client:latest@@ -61,6 +57,24 @@ services:environment:ConnectionStrings__AliasServerDbContext: "Host=postgres;Database=aliasvault;Username=aliasvault;Password=${POSTGRES_PASSWORD}"+ reverse-proxy:+ image: ghcr.io/lanedirt/aliasvault-reverse-proxy:latest+ ports:+ - "${HTTP_PORT:-80}:80"+ - "${HTTPS_PORT:-443}:443"+ volumes:+ - ./certificates/ssl:/etc/nginx/ssl:rw+ - ./certificates/letsencrypt:/etc/nginx/ssl-letsencrypt:rw+ - ./certificates/letsencrypt/www:/var/www/certbot:rw+ depends_on:+ - admin+ - client+ - api+ - smtp+ restart: always+ env_file:+ - .env+smtp:image: ghcr.io/lanedirt/aliasvault-smtp:latestports:@@ -90,18 +104,4 @@ services:postgres:condition: service_healthyenvironment:- ConnectionStrings__AliasServerDbContext: "Host=postgres;Database=aliasvault;Username=aliasvault;Password=${POSTGRES_PASSWORD}"-- postgres:- image: ghcr.io/lanedirt/aliasvault-postgres:latest- volumes:- - ./database/postgres:/var/lib/postgresql/data:rw- env_file:- - .env- restart: always- healthcheck:- test: ["CMD-SHELL", "pg_isready -U aliasvault"]- interval: 5s- timeout: 5s- retries: 5- start_period: 10s+ ConnectionStrings__AliasServerDbContext: "Host=postgres;Database=aliasvault;Username=aliasvault;Password=${POSTGRES_PASSWORD}"\ No newline at end of filediff --git a/docs/misc/release/create-new-release.md b/docs/misc/release/create-new-release.mdindex 5fac8fabb..cc0bc68f9 100644--- a/docs/misc/release/create-new-release.md+++ b/docs/misc/release/create-new-release.md@@ -10,10 +10,16 @@ nav_order: 1Follow the steps in the checklist below to prepare a new release.+## Versioning- [ ] Update ./src/Shared/AliasVault.Shared.Core/AppInfo.cs and update major/minor/patch to the new version. This version will be shown in the client and admin app footer.- [ ] Update ./install.sh `@version` in header if the install script has changed. This allows the install script to self-update when running ./install.sh update command on default installations.-- [ ] Update README screenshots if applicable-- [ ] Update README current/upcoming features-Optional steps:+## Docker Images+If docker containers have been added or removed:+- [ ] Verify that `publish-docker-images.yml` contains all docker images that need to be published.+- [ ] Update `install.sh` and verify that the `images()` array that takes care of pulling the images from the GitHub Container Registry is updated.++## Documentation- [ ] Update /docs instructions if any changes have been made to the setup process+- [ ] Update README screenshots if applicable+- [ ] Update README current/upcoming featuresdiff --git a/install.sh b/install.shindex 8893875cf..13b71261f 100755--- a/install.sh+++ b/install.sh@@ -1452,6 +1452,7 @@ handle_install_version() {printf "${CYAN}> Installing version: ${target_version}${NC}\n"images=(+ "${GITHUB_CONTAINER_REGISTRY}-postgres:${target_version}""${GITHUB_CONTAINER_REGISTRY}-reverse-proxy:${target_version}""${GITHUB_CONTAINER_REGISTRY}-api:${target_version}""${GITHUB_CONTAINER_REGISTRY}-client:${target_version}"diff --git a/Dockerfile.postgres b/src/Databases/AliasServerDb/Dockerfilesimilarity index 62%rename from Dockerfile.postgresrename to src/Databases/AliasServerDb/Dockerfileindex 9ccbd44cf..ee6f092c8 100644--- a/Dockerfile.postgres+++ b/src/Databases/AliasServerDb/Dockerfile@@ -1,6 +1,6 @@FROM postgres:16-alpine# Add any custom PostgreSQL configurations if needed-COPY postgresql.conf /etc/postgresql/postgresql.conf+COPY src/Databases/AliasServerDb/postgresql.conf /etc/postgresql/postgresql.confCMD ["postgres", "-c", "config_file=/etc/postgresql/postgresql.conf"]\ No newline at end of filediff --git a/postgresql.conf b/src/Databases/AliasServerDb/postgresql.confsimilarity index 100%rename from postgresql.confrename to src/Databases/AliasServerDb/postgresql.conf