Uploaded image for project: 'Help-Desk'
  1. Help-Desk
  2. HELP-13320

[fiware-stackoverflow] Docker compose fiware WireCloud data persistance not loaded from volume

    Details

      Description

      Created question in FIWARE Q/A platform on 11-12-2017 at 09:12
      Please, ANSWER this question AT https://stackoverflow.com/questions/47748639/docker-compose-fiware-wirecloud-data-persistance-not-loaded-from-volume

      Question:
      Docker compose fiware WireCloud data persistance not loaded from volume

      Description:
      I am using a docker container for my FiWare WireCloud. It is working properly but when I stop my container with docker compose down and restart it with docker compose up all my data are erased even if I specified a volume for the postgresql database and I have the following error:

      ERROR: relation "wirecloud_workspace" does not exist at character 370

      If I want to make it work again, I have to recreate the whole database from scratch (initdb & createsuperuser)

      What I would like to do is to be able to save my wirecloud data inside a volume and be able te backup it and reload it. Here is my current docker-compose.yml file in version 3:

      version: '3.3'
      services:

      iot-mongo:
      image: mongo:3.2
      ports:

      • "27017:27017"
        volumes:
      • ./data/mongo:/data/db

      orion:
      image: fiware/orion:1.9.0
      links:

      • iot-mongo
        ports:
      • "1026:1026"
        command: -dbhost iot-mongo

      nginx:
      restart: always
      image: nginx:1.13
      ports:

      • "80:80"
      • "443:443"
        volumes:
      • ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
      • ./nginx/sites-available:/etc/nginx/sites-available
      • ./letsencrypt/well-known:/www/letsencrypt
      • /etc/letsencrypt/:/etc/letsencrypt/
      • wirecloudwww:/var/www/static
      • wirecloudinstance:/opt/wirecloud_instance
        links:
      • wirecloud:wirecloud
      • orion:orion
        postgres:
        restart: always
        image: postgres:latest
        ports:
      • "5432:5432"
        volumes:
      • postgresdata:/var/lib/postgresql
        environment:
        POSTGRES_USER: postgres
        POSTGRES_PASSWORD:
        POSTGRES_DB: postgres
        PGDATA: /tmp
        wirecloud:
        restart: always
        image: fiware/wirecloud:1.0-composable
        links:
      • postgres:postgres
        volumes:
      • wirecloudwww:/var/www/static
      • wirecloudinstance:/opt/wirecloud_instance
        volumes:
        wirecloudwww: {}
        wirecloudinstance: {}
        postgresdata: {}

      I also tried with docker-compose v1 like they show in the documentation but the result is the same.

        Activity

        Hide
        backlogmanager Backlog Manager added a comment -

        2018-01-12 19:50|CREATED monitor | # answers= 1, accepted answer= True

        Show
        backlogmanager Backlog Manager added a comment - 2018-01-12 19:50|CREATED monitor | # answers= 1, accepted answer= True
        Hide
        backlogmanager Backlog Manager added a comment -

        2018-01-12 19:53|UPDATED status: transition Answer| # answers= 1, accepted answer= True

        Show
        backlogmanager Backlog Manager added a comment - 2018-01-12 19:53|UPDATED status: transition Answer| # answers= 1, accepted answer= True
        Hide
        backlogmanager Backlog Manager added a comment -

        2018-01-12 20:02|UPDATED status: transition Finish| # answers= 1, accepted answer= True

        Show
        backlogmanager Backlog Manager added a comment - 2018-01-12 20:02|UPDATED status: transition Finish| # answers= 1, accepted answer= True

          People

          • Assignee:
            aarranz Álvaro Arranz
            Reporter:
            backlogmanager Backlog Manager
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: