Skip to content
This repository has been archived by the owner on Jul 31, 2020. It is now read-only.

WIP: Docker support #63

Open
wants to merge 1 commit into
base: staging
Choose a base branch
from
Open

Conversation

jdoubleu
Copy link

@jdoubleu jdoubleu commented Mar 9, 2017

Instead of creating a new feature request I decided to implement it my own.

What does this PR?
Adding docker support: The sync server is run from inside a docker container having all dependencies met so it's easy to run a Brave sync server. The only thing you need is docker installed.

Things to be done before merging

  • add some (minimal) instructions to the README.
  • Configure CI to autobuild a docker image?

How about publishing this image on the official Docker Repo (Docker Hub) as an official image?

What do you think about it?

@diracdeltas
Copy link
Member

i'm in favor of this, though not terribly familiar with docker

@farfeduc
Copy link

farfeduc commented Jul 25, 2017

I have some experience with Docker (even-though seeing my github profile might not reflect this) and this docker image cannot be much improved upon. I would just add some of the environment variables available to configure the server.

As for the CI, the Docker hub automatic build upon push should be plenty.
It would just need the creation of a "brave" organization by one of the GitHub organization members (not an account, an organization, which can be created and managed by a personal account with the right privileges just like on GitHub).

As for the readme, I would add to the PR, at the bottom of the current file something like : (with the proper comments for the environment variables)


SelfHosting

Docker

Run the sync server with :

docker run -d -it -e AWS_ACCESS_KEY_ID=xxxxxx -e AWS_SECRET_ACCESS_KEY=xxxxx -e AWS_REGION=ap-southeast-1 -e AWS_S3_BUCKET=mybucket -p 4000:4000 brave/sync

Replace the following environment variable values with your AWS info (self-explanatory) :

AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
AWS_REGION
AWS_S3_BUCKET

Other variables also available :

LOG_LEVEL //What are the possible values here ?
SENTRY_URL //What does this correspond to ?
SERVER_URL // Sync server domain name / hostname 
USER_AGENT // What does this correspond to ?
USER_AWS_CREDENTIAL_TTL // What does this correspond to precisely ? What is the time unit ?

This image is built from this Dockerfile on the Docker hub

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants