Skip to content

Commit

Permalink
Update to Go 1.16 ProxeusApp#217
Browse files Browse the repository at this point in the history
  • Loading branch information
loleg committed Mar 24, 2021
1 parent 1edbed1 commit 9e3aac8
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 50 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ executors:
environment:
PROJECT_ROOT_FOLDER: ~/project
docker:
- image: cimg/go:1.15.10-node
- image: cimg/go:1.16-node
docker-image-golang-dependencies:
environment:
PROJECT_ROOT_FOLDER: ~/project
docker:
- image: cimg/go:1.15.10-node
- image: cimg/go:1.16-node
- image: proxeus/node-crypto-forex-rates
- image: proxeus/document-service
- image: proxeus/mongo-dev-cluster
Expand Down
24 changes: 15 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
SHELL:= /bin/bash
DEBUG_FLAG?=false
GO_VERSION=1.13
GO_VERSION=1.16

ifeq ($(DEBUG), "true")
BINDATA_OPTS="-debug"
Expand All @@ -10,14 +10,6 @@ ifdef BUILD_ID
GO_OPTS=-ldflags="-X main.ServerVersion=build-$(BUILD_ID)"
endif

DOCKER_GATEWAY=172.17.0.1
DOCKER=sudo docker
ifeq ($(shell uname), Darwin)
DOCKER_LINUX=docker run --rm -v "$(PWD):/usr/src" -w /usr/src golang:$(GO_VERSION)
DOCKER_GATEWAY=host.docker.internal
DOCKER=docker
endif

# Load dotenv configuration
ifneq (,$(wildcard ./.env))
include .env
Expand All @@ -40,6 +32,20 @@ export PROXEUS_DATABASE_URI?=mongodb://localhost:27017

#########################################################

# Docker build set up

DOCKER_GATEWAY=172.17.0.1
DOCKER=sudo docker
export BUILD_WITH_DOCKER?=false
ifeq ($(shell uname), Darwin)
BUILD_WITH_DOCKER=true
endif
ifeq ($(BUILD_WITH_DOCKER), true)
DOCKER_LINUX=docker run --rm -v "$(PWD):/usr/src" -w /usr/src golang:$(GO_VERSION)
DOCKER_GATEWAY=host.docker.internal
DOCKER=docker
endif

#########################################################

# Coverage
Expand Down
Empty file modified bootstrap.sh
100644 → 100755
Empty file.
23 changes: 18 additions & 5 deletions docs/build_docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

## Build a Docker image


The project includes a `Dockerfile` that is used to create the `proxeus-core` docker image.

First you need to have the [Docker Engine](https://docs.docker.com/install/) installed.
Expand All @@ -19,10 +18,17 @@ Please refer to the `docker-compose.yml` file to learn how to configure a Proxeu

## Using Docker during development

You can use Docker during development:
If you want to use a Docker image to build your server (for example, when you are not on a Linux machine or have a newer version of GLIBC than is supported in production), compile as follows:

```
BUILD_WITH_DOCKER=true make init server-docker
docker build .
```

You can of course use Docker to run the platform during development:

```
docker-compose build
docker-compose build
docker-compose up
```

Expand All @@ -33,9 +39,17 @@ docker-compose build
docker-compose restart
```

This will build the proxeus-core image based on your current project and use a deployed image
This will build the proxeus-core image based on your current project and use a deployed image
for the document service.

If you're having trouble, try a clean full build, specifying each of the configuration files:

```
make clean
BUILD_WITH_DOCKER=true make init server-docker
docker-compose --env-file .env -f docker-compose.yml -f docker-compose.override.yml build
```

## Using Docker for deployment

For deployment, a `docker-compose-cloud.override.yml` file is provide and must be used
Expand All @@ -44,4 +58,3 @@ instead of the default `docker-compose.override.yml`:
```
docker-compose -f docker-compose.yml -f docker-compose-cloud.override.yml
```

5 changes: 3 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/ProxeusApp/proxeus-core

go 1.13
go 1.16

require (
github.com/DataDog/zstd v1.4.8 // indirect
Expand Down Expand Up @@ -62,7 +62,6 @@ require (
github.com/karalabe/usb v0.0.0-20191104083709-911d15fe12a9 // indirect
github.com/labstack/echo v3.3.10+incompatible
github.com/labstack/echo-contrib v0.9.0
github.com/labstack/echo/v4 v4.2.1 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/onsi/ginkgo v1.15.2 // indirect
github.com/peterh/liner v1.2.1 // indirect
Expand All @@ -76,6 +75,8 @@ require (
github.com/tklauser/go-sysconf v0.3.5 // indirect
github.com/tyler-smith/go-bip39 v1.1.0 // indirect
github.com/valyala/fasthttp v1.22.0 // indirect
github.com/valyala/fasttemplate v1.2.1 // indirect
github.com/wadey/gocovmerge v0.0.0-20160331181800-b5bfa59ec0ad // indirect
github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a // indirect
golang.org/x/image v0.0.0-20210220032944-ac19c3e999fb // indirect
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
Expand Down
Loading

0 comments on commit 9e3aac8

Please sign in to comment.