AppFlowy-IO / AppFlowy-Cloud

AppFlowy is an open-source alternative to Notion. You are in charge of your data and customizations. Built with Flutter and Rust.
GNU Affero General Public License v3.0
982 stars 207 forks source link

[Bug] Deploying problem, Can't build by docker compose #614

Open mickey3721 opened 3 months ago

mickey3721 commented 3 months ago

Describe the bug When i use docker compose up to redeploy the server, it stuck in building process

To Reproduce Steps to reproduce the behavior:

  1. go into AppFlowy-Cloud dir
  2. copy deploy.env to .env, modified .env as needed
  3. run: docker compose up -d
  4. Message showed, I need to choose option, but actually can't input anything at all, the process stuck on it, it seems some version conflict problem, also I try to deploy the server by remove all containers and images, the same problem happens

5 389.9 Configuring postgresql-common

5 389.9 -----------------------------

5 389.9

5 389.9 createcluster.conf: A new version (/tmp/postgresql-common.eLmlQd) of

5 389.9 configuration file /etc/postgresql-common/createcluster.conf is available, but

5 389.9 the version installed currently has been locally modified.

5 389.9

5 389.9 1. install the package maintainer's version

5 389.9 2. keep the local version currently installed

5 389.9 3. show the differences between the versions

5 389.9 4. show a side-by-side difference between the versions

5 389.9 5. start a new shell to examine the situation

5 389.9 What do you want to do about modified configuration file createcluster.conf?

Expected behavior How to solve the problem? any bug in version conflict of redeployment the server?

Screenshots image

Desktop (please complete the following information):

Additional context

mickey3721 commented 3 months ago

For dialog is missing in the built container, install dialog to the container will solve the problem. Add lines to ~/AppFlowy-Cloud/postgres/postgres.Dockerfile

postgres.Dockerfile after modified:

This is installing the pgvector extension for postgres

FROM postgres:latest

ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update && \ apt-get -y install sudo dialog apt-utils RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections

RUN apt-get update && apt-get install -y \ build-essential \ git \ postgresql-server-dev-all \ && rm -rf /var/lib/apt/lists/*

WORKDIR /tmp RUN git clone https://github.com/pgvector/pgvector.git

WORKDIR /tmp/pgvector RUN make RUN make install