Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redirects to installation page after initial install #1037

Open
bregoh opened this issue Feb 29, 2024 · 4 comments
Open

Redirects to installation page after initial install #1037

bregoh opened this issue Feb 29, 2024 · 4 comments
Assignees
Milestone

Comments

@bregoh
Copy link

bregoh commented Feb 29, 2024

I used smartstore docker container on Azure, connected to Postgres DB. After the first installation and database write, a successful message appears and asked to click for redirection or wait for automatic redirection. However, when I wait or click that, I return back to the installation page and it continues in the same cycle

Service: Azure web app service
Container Registry: Azure container registry
DB: Postgresql

Also note that I have neither updated nor modified the docker image, I pulled from smartstore and pushed to azure. No article online can tell me why this happens.

Its urgent. Thanks!!!

@zihniartar
Copy link
Contributor

The reason for this is that there is no volume for the "Tenants" folder.

For my own tests, I put the tenants folder of Docker containers in a local folder (outside of Docker, on my PC), like this:

Volumes:
      - "./Tenants/:/app/App_Data/Tenants:rw"

I also place the volume for the PostgreSQL database in a local folder:

volumes:
       - postgres-db:/data/postgres

volumes
  postgres-db:
    Driver: local

If I do the same in Azure, Smartstore behaves as you described. The installation accepts all entries and runs through. After the restart, the installation page appears again.

However, if I create extra volumes for the tenant folder and the PostgreSQL-DB, Smartstore is installed correctly and runs.
I have never used the Azure Registry, probably you create the volumes via startup command.

Here is my complete Docker Compose file:

version: "3.4"
services:
  web-pg:
    image: ghcr.io/smartstore/smartstore-linux:latest
    container_name: web-pg
    ports:
      - "80:80"
    restart: unless-stopped
    depends_on:
      - db
    volumes:
      - App_Data:/app/App_Data/Tenants 
  db:
    image: postgres:latest
    environment:
      POSTGRES_USER: super_admin
      POSTGRES_PASSWORD: SomeSecretPassword
      PGDATA: /data/postgres
    restart: unless-stopped 
    volumes:
      - postgres-db:/data/postgres
    ports:
      - "5432:5432"

volumes:
  postgres-db:
  App_Data: 

@zihniartar
Copy link
Contributor

Addendum: if you are using our image file 1:1 anyway, you can also use the docker compose script.

You then select Docker Compose as the option and "Private Registry" as the image source.

The server URL is http://ghcr.io/smartstore/smartstore-linux.

For the configuration file, select the Docker Compose file.

@bregoh
Copy link
Author

bregoh commented Mar 2, 2024

I fixed the issue on Azure.

Here is what I did if anyone faced the same issues.

  1. Create your database seperately, and if you go for postgresql, do enable citext in the extension
  2. create an azure storage but create a file share container instead of azure blob. File share is read and write but blob is read only
  3. Inside file share container, make sure you have this folder /app/App_Data/Tenants as you saw in the docker compose above (very important)
  4. Go for web app with container, its easily to run custom deployments with that.
  5. then go to configuration in the web app and mount your file share container
  6. restart your app and run

@bregoh
Copy link
Author

bregoh commented Mar 2, 2024

Thanks @zihniartar for pointing the folder necessary to hold the data, I will leave this open for a few days and close it off

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants