Dockerfile with MySQL to MongoDB replication
Shell
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Dockerfile
README.md
etc-mongod.conf
etc-ssh-sshd_config
init-node.sh
mysql-setup.sh
odata-server-package.json
root-ssh-authorized_keys
root-ssh-id_rsa
root-ssh-id_rsa.pub
supervisord.conf

README.md

Usage

Build the docker image and start a container:

# Build an image
docker build  .

# Start the container
docker run -d [IMAGE ID]

# Get IP of the started container
docker inspect [container ID]

Test that the odata service works: curl --user admin:admin http://[IP]:52999/newsreader.svc$metadata

Get users in JSON: curl --user admin:admin --header "accept: application/json" http://[IP]:52999/newsreader.svc/Users

List all articles: curl --user admin:admin --header "accept: application/json" http://[IP]:52999/newsreader.svc/Articles

If yo want to make sure that mongod is runing:

# Install mongo client
sudo apt-get install -y mongodb-clients

# Connect to mongo
mongo [IP]:27017

Notes

The odata-server package.json file is broken. The connect module needs to be exactly version 2.0.0. There is a fix for this in the Dockerfile.