uvdesk / community-skeleton

UVdesk Opensource Community Helpdesk Project built for all to make a Full Ticketing Support System along with many more other features.
https://www.uvdesk.com
MIT License
7.15k stars 449 forks source link

Have to go through web installation again and lose all data after restarting Docker #668

Closed ghost closed 1 year ago

ghost commented 1 year ago

Bug report

Title

I have to go through the web installation everytime I restart PC. All my apps, articles, and settings are deleted.

Issue Description

I am running with docker with this docker-compose.yml file:

version: '3'
services:
  db:
    image: mysql:5.7
    volumes:
      - /volume1/docker/uvdeskdb:/var/lib/mysql
    restart: always
    networks:
      - uvdesk
    environment:
      MYSQL_DATABASE: uvdesk
      MYSQL_ROOT_PASSWORD: mariushosting
      MYSQL_USER: uvdesk
      MYSQL_PASSWORD: mariushosting
  uvdesk:
    image: nuttcorp/uvdesk:latest
    depends_on:
      - db
    tty: true
    environment:
        MYSQL_USER: uvdesk
        MYSQL_PASSWORD: mariushosting
        MYSQL_ROOT_PASSWORD: mariushosting
        MYSQL_DATABASE: uvdesk
    expose:
       - "6744"
       - "80"
    networks:
      - proxy
      - uvdesk
    ports:
        - 6744:80

networks:
  uvdesk:
    internal: true
  proxy:
    external: true

Why is my installation/all my data lost when I restart my computer? I start the same docker container up again and get a fresh web installation with all my settings gone?

Actual result

Installation and all app info should be saved on restart.

ghost commented 1 year ago

Fixed after adding local volumes to my docker-compose

volumes:
  app_data:
    driver: local
  db_data:
    driver: local

and adding

    volumes:
      - "app_data:/var/www:rw"

to the uvdesk image/service