Skip to content

Commit

Permalink
Docker setup for local builds (#314)
Browse files Browse the repository at this point in the history
* Update README.md

* Alternative chains support (#281)

* add new smart contract addresses on goerli and mumbai networks, update settings
* fix dependencies
* update circle checks go version

* update readme with chains list

* test negative scenario

* return goerli cobfig

* remove console metamask error (#286)

should fix #285

* Update README.md

* add console logs on default accounts setup and on sign request

* Test autodeploy flow (#290)

* Update README.md

* add console logs on default accounts setup and on sign request

---------

Co-authored-by: s-pro <33251086+sprotest@users.noreply.github.com>

* add more static js to Cache-Control

* Fix preview document bug (#295)

* add more static js to Cache-Control

fixes #292
[add more static js to Cache-Control]
---------

Co-authored-by: s-pro <33251086+sprotest@users.noreply.github.com>
Co-authored-by: epadalkin <epadalkin@s-pro.io>

* fix open prevuew

* Update docker-compose-cloud.override.yml

* Update docker-compose-cloud.override.yml

* The Watchtower service will never be used (#296)

* fix open prevuew

* Update docker-compose-cloud.override.yml

---------

Co-authored-by: Tatiana <tafonina@s-pro.io>
Co-authored-by: Afonina Tatiana <99973342+tafonina@users.noreply.github.com>
Co-authored-by: epadalkin <epadalkin@s-pro.io>

* add configuration for polygon and update addresses

* update configs atrribute for polygon

* Add polygon configs (#301)

* Update README.md

* add console logs on default accounts setup and on sign request

* add more static js to Cache-Control

* fix open prevuew

* Update docker-compose-cloud.override.yml

* Update docker-compose-cloud.override.yml

* add configuration for polygon and update addresses

* update configs atrribute for polygon

---------

Co-authored-by: s-pro <33251086+sprotest@users.noreply.github.com>
Co-authored-by: epadalkin <epadalkin@s-pro.io>

* Documentation changes, Yarn update (#303)

* Yarn update

* Deployment doc update

* Better enc key generation

* Preprod (#302)

* Update README.md

* Alternative chains support (#281)

* add new smart contract addresses on goerli and mumbai networks, update settings
* fix dependencies
* update circle checks go version

* update readme with chains list

* test negative scenario

* return goerli cobfig

* remove console metamask error (#286)

should fix #285

* Test autodeploy flow (#290)

* Update README.md

* add console logs on default accounts setup and on sign request

---------

Co-authored-by: s-pro <33251086+sprotest@users.noreply.github.com>

* Fix preview document bug (#295)

* add more static js to Cache-Control

fixes #292
[add more static js to Cache-Control]
---------

Co-authored-by: s-pro <33251086+sprotest@users.noreply.github.com>
Co-authored-by: epadalkin <epadalkin@s-pro.io>

* The Watchtower service will never be used (#296)

* fix open prevuew

* Update docker-compose-cloud.override.yml

---------

Co-authored-by: Tatiana <tafonina@s-pro.io>
Co-authored-by: Afonina Tatiana <99973342+tafonina@users.noreply.github.com>
Co-authored-by: epadalkin <epadalkin@s-pro.io>

* Add polygon configs (#301)

* Update README.md

* add console logs on default accounts setup and on sign request

* add more static js to Cache-Control

* fix open prevuew

* Update docker-compose-cloud.override.yml

* Update docker-compose-cloud.override.yml

* add configuration for polygon and update addresses

* update configs atrribute for polygon

---------

Co-authored-by: s-pro <33251086+sprotest@users.noreply.github.com>
Co-authored-by: epadalkin <epadalkin@s-pro.io>

---------

Co-authored-by: s-pro <33251086+sprotest@users.noreply.github.com>
Co-authored-by: Afonina Tatiana <99973342+tafonina@users.noreply.github.com>
Co-authored-by: epadalkin <epadalkin@s-pro.io>
Co-authored-by: Tatiana <tafonina@s-pro.io>

* Go 1.18 in CircleCI

* Go 1.18

* Go update

* Go update

* Vue-cli pinned to 4.x

* CircleCI builder

* Add go-bindata install

* Add gopath to CircleCI

* CircleCI config, go install

* Go update, go-ethereum Azimir

* Go 1.20

* make fmt

* Go-bindata again

* README

* Image based test-ui

* Sync nodejs ver in test-ui

* Add libxtst6 library for Cypress

* Add full deps for Cypress

---------

Co-authored-by: s-pro <33251086+sprotest@users.noreply.github.com>
Co-authored-by: Afonina Tatiana <99973342+tafonina@users.noreply.github.com>
Co-authored-by: epadalkin <epadalkin@s-pro.io>
Co-authored-by: Tatiana <tafonina@s-pro.io>
Co-authored-by: Oleg Lavrovsky <loleg@users.noreply.github.com>

* update support for sopelia network in the code and docs

* update go mod

* Light script for Docker

* Network usage notes

* Go modules updated

* Feature/fix web3 method from ascii (#312)

* fix web3.fromAscii to web3.utils.asciiToHex method in document floe

* replace web3 to this.wallet.proxeusFS.web3 as metamask no longer injects web3

* Update from ascii call in web3 (#313)

* fix web3.fromAscii to web3.utils.asciiToHex method in document floe

* replace web3 to this.wallet.proxeusFS.web3 as metamask no longer injects web3

* Update CircleCI build config

* Local Docker build support

---------

Co-authored-by: s-pro <33251086+sprotest@users.noreply.github.com>
Co-authored-by: Afonina Tatiana <99973342+tafonina@users.noreply.github.com>
Co-authored-by: Tatiana <tafonina@s-pro.io>
Co-authored-by: epadalkin <epadalkin@s-pro.io>
Co-authored-by: Oleg Lavrovsky <loleg@users.noreply.github.com>
  • Loading branch information
6 people committed Jun 26, 2023
1 parent f5c9269 commit 7353f67
Show file tree
Hide file tree
Showing 3 changed files with 152 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:stable-slim
FROM debian:stable

RUN apt-get update && apt-get install -y \
ca-certificates \
Expand Down
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ server: generate
server-docker: generate
$(DOCKER_LINUX) go build $(GO_OPTS) -tags nocgo -o ./artifacts/proxeus-docker ./main

.PHONY: build-docker
build-docker: server-docker
# Creates a local Docker image
$(DOCKER) build -f Dockerfile -t proxeus/proxeus-core:latest -t proxeus/proxeus-core .

.PHONY: validate
validate: init
@if [[ "$$(goimports -l -local $(golocalimport) main sys storage service | grep -v bindata.go | tee /dev/tty | wc -l | xargs)" != "0" ]]; then \
Expand Down
146 changes: 146 additions & 0 deletions docker-compose-local.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
---
# Slim version of the Docker Compose cloud deployment

version: '3.7'

networks:
xes-platform-network:
name: xes-platform-network
reverse-proxy:
name: reverse-proxy
driver: bridge

services:
platform:
build:
context: .
container_name: xes-platform
depends_on:
- document-service
networks:
- xes-platform-network
- reverse-proxy
restart: unless-stopped
environment:
TZ: Europe/Zurich
PROXEUS_PLATFORM_DOMAIN: "${PROXEUS_PLATFORM_DOMAIN:-http://xes-platform:1323}"
PROXEUS_DOCUMENT_SERVICE_URL: "http://document-service:2115/"
PROXEUS_BLOCKCHAIN_CONTRACT_ADDRESS: "${PROXEUS_BLOCKCHAIN_CONTRACT_ADDRESS}"
PROXEUS_INFURA_API_KEY: "${PROXEUS_INFURA_API_KEY}"
PROXEUS_SPARKPOST_API_KEY: "${PROXEUS_SPARKPOST_API_KEY}"
PROXEUS_ENCRYPTION_SECRET_KEY: "${PROXEUS_ENCRYPTION_SECRET_KEY}"
PROXEUS_EMAIL_FROM: "${PROXEUS_EMAIL_FROM:-no-reply@example.com}"
PROXEUS_DATABASE_ENGINE: "${PROXEUS_DATABASE_ENGINE:-storm}"
PROXEUS_DATABASE_URI: "${PROXEUS_DATABASE_URI:-mongodb://root:root@mongo:27017}"
PROXEUS_TEST_MODE: "${PROXEUS_TEST_MODE:-false}"
PROXEUS_ALLOW_HTTP: "${PROXEUS_ALLOW_HTTP:-true}"
# Replace values for reverse-proxy
VIRTUAL_HOST: ${PROXEUS_VIRTUAL_HOST:-proxeus.example.com}
VIRTUAL_PORT: 1323
# Replace values for letsencrypt
LETSENCRYPT_HOST: ${PROXEUS_VIRTUAL_HOST:-proxeus.example.com}
LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL:-admin@proxeus.example.com}
ports:
- "1323:1323"
volumes:
- ${PROXEUS_DATA_DIR:-./data}/proxeus-platform/data:/data/hosted
- ${PROXEUS_DATA_DIR:-./data}/proxeus-platform/settings:/root/.proxeus/settings

# Add Nginx reverse-proxy
# https://hub.docker.com/r/jwilder/nginx-proxy/
# Automated Nginx reverse proxy for docker containers
nginx-proxy:
container_name: nginx-proxy
image: jwilder/nginx-proxy
ports:
- "80:80"
- "443:443"
volumes:
- nginx-share:/etc/nginx/vhost.d
- nginx-share:/usr/share/nginx/html
- ./nginx-timeout.conf:/etc/nginx/conf.d/nginx-timeout.conf
- ${PROXEUS_DATA_DIR:-./data}/certs:/etc/nginx/certs:ro
- ${DOCKER_SOCK:-/var/run/docker.sock}:/tmp/docker.sock:ro
networks:
- reverse-proxy
labels:
com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true"
restart: unless-stopped

# Add Letsencrypt
# https://hub.docker.com/r/jrcs/letsencrypt-nginx-proxy-companion/
# LetsEncrypt container to use with nginx as proxy
letsencrypt:
image: jrcs/letsencrypt-nginx-proxy-companion
depends_on:
- nginx-proxy
networks:
- reverse-proxy
volumes:
- nginx-share:/etc/nginx/vhost.d
- nginx-share:/usr/share/nginx/html
- ${PROXEUS_DATA_DIR:-./data}/certs:/etc/nginx/certs:rw
- ${DOCKER_SOCK:-/var/run/docker.sock}:/var/run/docker.sock:ro
restart: unless-stopped

document-service:
image: proxeus/document-service:latest
container_name: xes_document_service
networks:
- xes-platform-network
- reverse-proxy
restart: unless-stopped
environment:
TZ: Europe/Zurich
# Replace values for reverse-proxy
VIRTUAL_HOST: ${DOCUMENT_SERVICE_VIRTUAL_HOST:-proxeus.example.com}
VIRTUAL_PORT: 2115
# Replace values for letsencrypt
LETSENCRYPT_HOST: ${DOCUMENT_SERVICE_VIRTUAL_HOST:-proxeus.example.com}
LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL:-admin@example.com}
ports:
- "2115:2115"
volumes:
- ${PROXEUS_DATA_DIR:-./data}/document-service/logs:/document-service/logs
- ${PROXEUS_DATA_DIR:-./data}/document-service/fonts:/document-service/fonts

node-mail-sender:
image: proxeus/node-mail-sender:latest
container_name: xes_node-mail-sender
networks:
- xes-platform-network
restart: unless-stopped
environment:
PROXEUS_INSTANCE_URL: "${PROXEUS_PLATFORM_DOMAIN:-http://xes-platform:1323}"
SERVICE_SECRET: secret
SERVICE_PORT: 8013
SERVICE_URL: "${NODE_CRYPTO_RATES_URL:-http://node-mail-sender:8013}"
TZ: Europe/Zurich
PROXEUS_SPARKPOST_API_KEY: "${PROXEUS_SPARKPOST_API_KEY}"
ports:
- "8013:8013"

node-json-sender:
image: proxeus/node-json-sender:latest
container_name: xes_node-json-sender
networks:
- xes-platform-network
restart: unless-stopped
environment:
PROXEUS_INSTANCE_URL: "${PROXEUS_PLATFORM_DOMAIN:-http://xes-platform:1323}"
SERVICE_SECRET: secret
SERVICE_PORT: 8015
SERVICE_URL: "${SERVICE_DOMAIN:-http://node-json-sender:8015}"
JSON_SENDER_URL: http://url:123/endpoint
JSON_SENDER_HEADER_clientid: client_id
JSON_SENDER_HEADER_tenantid: tenant_id
JSON_SENDER_HEADER_secret: secret
JSON_SENDER_HEADER_oauthserverurl: oauth_url
TZ: Europe/Zurich
ports:
- "8015:8015"

volumes:
# Add volume for nginx-proxy and letsencrypt
nginx-share:

0 comments on commit 7353f67

Please sign in to comment.