From df82bbc0f3044b503cf3bb1358432242ba9cf01d Mon Sep 17 00:00:00 2001 From: Brian Falk Date: Mon, 5 Aug 2019 16:26:16 -0400 Subject: [PATCH] Add support for Sail development environments (#1248) * initial sail Dockerfile * host mount the module download cache so it's preserved over restarts * expose port 3000 * add some basic docs --- .sail/Dockerfile | 7 +++++++ DEVELOPMENT.md | 15 +++++++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 .sail/Dockerfile diff --git a/.sail/Dockerfile b/.sail/Dockerfile new file mode 100644 index 00000000..891c2cb1 --- /dev/null +++ b/.sail/Dockerfile @@ -0,0 +1,7 @@ +FROM codercom/ubuntu-dev-go + +ENV GO111MODULE=on + +LABEL share.go_mod="~/go/pkg/mod:~/go/pkg/mod" + +EXPOSE 3000 diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index f8c028eb..ee646f6d 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -27,12 +27,13 @@ GO_BINARY_PATH=go1.11.X # Run the Proxy -We provide two ways to run the proxy on your local machine: +We provide three ways to run the proxy on your local machine: 1. Using [Docker](https://www.docker.com/) and [Docker Compose](https://docs.docker.com/compose/) (_we suggest this one if you're getting started_) 2. Natively on your host +3. Using [Sail](https://sail.dev) -See below for instructions to do both! +.See below for instructions for each option! ## Using Docker @@ -96,6 +97,16 @@ After the server starts, you'll see some console output like: Starting application at 127.0.0.1:3000 ``` +## Using Sail + +Follow instructions at [sail.dev](https://sail.dev) to setup the sail CLI. Then simply run: + +``` +sail run gomods/athens +``` + +The command will automatically clone the athens repo and give you a local URL that you can use to open an editor and development environment directly in your browser. + ### Dependencies # Services that Athens Needs