Human Connection
docs_fix_link
docs_fix_link
  • Introduction
  • Edit this Documentation
  • Installation
  • Backend
    • graphql-with-apollo
      • GraphQL with Apollo
        • Mocking
        • Seeding
    • Import
    • Middleware
  • Webapp
    • COMPONENTS
    • PLUGINS
    • STORE
    • PAGES
    • ASSETS
    • LAYOUTS
    • Styleguide
    • STATIC
    • MIDDLEWARE
  • Testing Guide
    • End-to-end tests
    • Frontend tests
    • Backend tests
  • Contributing
  • Deployment
  • Feature Specification
  • Code of conduct
  • License
Powered by GitBook
On this page
  • Prerequisites
  • Run the database migration

Was this helpful?

  1. Backend

Import

PreviousSeedingNextMiddleware

Last updated 6 years ago

Was this helpful?

This guide helps you to import data from our legacy servers, which are using FeathersJS and MongoDB.

Prerequisites

You need installed on your machine. Furthermore you need SSH access to the server and you need to know the following login credentials and server settings:

Environment variable

Description

SSH_USERNAME

Your ssh username on the server

SSH_HOST

The IP address of the server

MONGODB_USERNAME

Mongo username on the server

MONGODB_PASSWORD

Mongo password on the server

MONGODB_AUTH_DB

Mongo authentication database

MONGODB_DATABASE

The name of the mongo database

UPLOADS_DIRECTORY

Path to remote uploads folder

Run the database migration

Run docker-compose with all environment variables specified:

SSH_USERNAME=username SSH_HOST=some.server.com MONGODB_USERNAME='hc-api' MONGODB_PASSWORD='secret' MONGODB_DATABASE=hc_api MONGODB_AUTH_DB=hc_api UPLOADS_DIRECTORY=/var/www/api/uploads  docker-compose up

Download the remote mongo database:

docker-compose exec db-migration-worker ./import.sh

Import the local download into Neo4J:

docker-compose exec neo4j import/import.sh
docker