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

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        3m 12s 1 Backlog Manager 12/Jan/18 7:53 PM
        In Progress In Progress Closed Closed
        8m 56s 1 Backlog Manager 12/Jan/18 8:02 PM

          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: