mozilla-services / syncserver

Run-Your-Own Firefox Sync Server
Mozilla Public License 2.0
1.87k stars 145 forks source link

Add a preliminary Dockerfile #16

Closed callahad closed 10 years ago

callahad commented 10 years ago

Preliminary work on a Docker version of "How To Run Firefox Sync 1.5"

Prerequisites

  1. Docker
  2. Firefox 29 (Beta), or newer

    Building and running the server

With the Dockerfile below in the current directory, run:

  1. docker build -t sync:server .
  2. docker run -i -t -p 5000:5000 sync:server
  3. Visit http://localhost:5000, it should say "it works!"

    Starting / Stopping the Sync service

Use docker ps -a to see all containers, both running and stopped.

Use docker stop <container_id> to stop a running container.

Use docker start <container_id> to start a running container.

Using the server

  1. Go to about:config, change services.sync.tokenServerURI to http://localhost:5000/token/1.0/sync/1.5
  2. Open the Browser Console (Ctrl-Shift-J)
  3. Try to use Firefox Sync -- you should see log output from Docker, and the Browser Console should show connections to http://localhost:5000