Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Go modules #323

Merged
merged 43 commits into from
Aug 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
454630d
Yarn update
loleg Apr 5, 2023
4471579
Deployment doc update
loleg Apr 5, 2023
8b61084
Better enc key generation
loleg Apr 17, 2023
9112e52
Merge branch 'main' of https://github.com/ProxeusApp/proxeus-core
loleg Apr 17, 2023
1b405ea
Go 1.18 in CircleCI
loleg May 22, 2023
ea29cb3
Go 1.18
loleg May 22, 2023
dd814e1
Go update
loleg May 23, 2023
9cd9639
Go update
loleg May 23, 2023
5dcc6b8
Vue-cli pinned to 4.x
loleg May 23, 2023
1bc53f6
CircleCI builder
loleg May 23, 2023
6456ccb
Add go-bindata install
loleg May 23, 2023
f175b54
Add gopath to CircleCI
loleg May 24, 2023
dfd80a6
CircleCI config, go install
loleg May 25, 2023
318346e
Go update, go-ethereum Azimir
loleg May 25, 2023
f26ef03
Go 1.20
loleg May 25, 2023
3d8255f
make fmt
loleg May 25, 2023
5361e88
Go-bindata again
loleg May 25, 2023
e9ac427
README
loleg May 25, 2023
3d8141b
Image based test-ui
loleg May 25, 2023
c2bbde4
Sync nodejs ver in test-ui
loleg May 25, 2023
1fb7c0d
Add libxtst6 library for Cypress
loleg May 25, 2023
30ffe0d
Add full deps for Cypress
loleg May 25, 2023
bbed874
Quickstart docs
loleg Jun 8, 2023
f5c9269
Sepolia support merge preprod to main (#309)
tafonina Jun 26, 2023
7353f67
Docker setup for local builds (#314)
loleg Jun 26, 2023
4ec79e7
Merged
loleg Jun 26, 2023
74abc91
Cleaned up CircleCI, added version release
loleg Jun 26, 2023
25bf7b0
Yarn upgrade
loleg Jul 3, 2023
efabceb
Go update #316
loleg Jul 3, 2023
52ccbcb
Merged
loleg Jul 3, 2023
82beac2
Go modules
loleg Jul 3, 2023
578f756
Removed demo and staging from workflow
loleg Jul 3, 2023
1961902
Bump word-wrap from 1.2.3 to 1.2.4 in /ui (#321)
dependabot[bot] Jul 18, 2023
5c148e5
Bump semver from 5.7.1 to 5.7.2 in /test/e2e (#320)
dependabot[bot] Jul 18, 2023
632d4d0
Bump semver from 5.7.1 to 5.7.2 in /ui (#319)
dependabot[bot] Jul 18, 2023
a10a6d1
Preprod merge to main (#317)
loleg Jul 21, 2023
81f46f3
Preprod merge to main (#322)
tafonina Aug 11, 2023
e83e04a
Merged branch 318
loleg Aug 11, 2023
f317ceb
Updated Go mods, downgrading x/exp due to go-ethereum/issues/27894
loleg Aug 11, 2023
baf7ada
Merged main
loleg Aug 11, 2023
f0b5a60
Merge branch 'main' into preprod
loleg Aug 11, 2023
7885682
Go fix, Yarn upgrade
loleg Aug 11, 2023
5ebcb29
Revert to Debian Slim in Dockerfile
loleg Aug 11, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 3 additions & 93 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -219,60 +219,9 @@ jobs:
command: |
echo "$DOCKERHUB_PASS" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin
docker push $CONTAINER_IMAGE_NAME:latest

publish-staging:
executor: docker-publisher
steps:
- attach_workspace:
at: /tmp/workspace
- setup_remote_docker
- run:
name: Load archived Docker image
command: docker load -i /tmp/workspace/image.tar
- run:
name: Tag staging docker image
command: docker tag $CONTAINER_IMAGE_NAME $CONTAINER_IMAGE_NAME:staging
- run:
name: Publish staging Docker Image to Docker Hub
command: |
echo "$DOCKERHUB_PASS" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin
docker push $CONTAINER_IMAGE_NAME:staging

publish-demo:
executor: docker-publisher
steps:
- attach_workspace:
at: /tmp/workspace
- setup_remote_docker
- run:
name: Load archived Docker image
command: docker load -i /tmp/workspace/image.tar
- run:
name: Tag demo docker image
command: docker tag $CONTAINER_IMAGE_NAME $CONTAINER_IMAGE_NAME:demo
- run:
name: Publish demo Docker Image to Docker Hub
command: |
echo "$DOCKERHUB_PASS" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin
docker push $CONTAINER_IMAGE_NAME:demo

publish-handelsregister:
executor: docker-publisher
steps:
- attach_workspace:
at: /tmp/workspace
- setup_remote_docker
- run:
name: Load archived Docker image
command: docker load -i /tmp/workspace/image.tar
- run:
name: Tag handelsregister docker image
command: docker tag $CONTAINER_IMAGE_NAME $CONTAINER_IMAGE_NAME:handelsregister
- run:
name: Publish handelsregister Docker Image to Docker Hub
command: |
echo "$DOCKERHUB_PASS" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin
docker push $CONTAINER_IMAGE_NAME:handelsregister
name: Tag the latest Docker release with current Git version
command: docker tag $CONTAINER_IMAGE_NAME:$CIRCLE_TAG $CONTAINER_IMAGE_NAME:latest

workflows:
version: 2
Expand Down Expand Up @@ -315,43 +264,4 @@ workflows:
- build-docker-image
filters:
branches:
only: main
- approve-staging:
type: approval
requires:
- build-docker-image
filters:
branches:
only: main
- publish-staging:
requires:
- approve-staging
filters:
branches:
only: main
- approve-demo:
type: approval
requires:
- publish-staging
filters:
branches:
only: main
- publish-demo:
requires:
- approve-demo
filters:
branches:
only: main
- approve-handelsregister:
type: approval
requires:
- publish-staging
filters:
branches:
only: main
- publish-handelsregister:
requires:
- approve-handelsregister
filters:
branches:
only: main
only: main
8 changes: 8 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 Expand Up @@ -209,7 +214,10 @@ coverage:
.PHONY: clean
clean:
cd artifacts && rm -rf `ls . | grep -v 'cache'`
echo "Clearing the JS cache"
cd ui && yarn cache clean && cd ..
echo "Clearing the Go module cache"
go clean -modcache

.PHONY: run
run: server
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:

2 changes: 1 addition & 1 deletion docs/build_docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,5 @@ docker-compose -f docker-compose.yml -f docker-compose-cloud.override.yml
There is also a Docker Compose configure in one file with a 'minimal' Proxeus installation. The only extra nodes are 'mail-sender' and 'json-sender':

```
docker-compose -f docker-compose-light.yml
docker-compose -f docker-compose-light.yml up
```
12 changes: 9 additions & 3 deletions docs/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,19 @@ dependencies:
2. [Install docker-compose](https://docs.docker.com/compose/install/)


You easily deploy Proxeus using Docker. The repository includes several `docker-compose` YAML files that can be
used to deploy the platform in different context:
You easily deploy Proxeus using Docker. The repository includes several `docker-compose` YAML files that can be used to deploy the platform in different context:

* `docker-compose.yml`
* `docker-compose.override.yml`
* `docker-compose-cloud-override.yml`

In each case you can then use the **logs** command to see the system status (with the useful `-f` parameter):

`docker-compose logs`

For more usage instructions, visit the [Docker Compose CLI reference](https://docs.docker.com/compose/reference/).


## Simple Docker Compose

This is the simplest method to experiment with Proxeus. This will start a local Proxeus platform
Expand Down Expand Up @@ -148,7 +154,7 @@ with the `docker-compose.yml` file as described in [Multiple Compose files](http
It will add the required configuration to deploy Proxeus on a hosted VM for example on Google Cloud or AWS,
including
* [nginx](https://hub.docker.com/r/jwilder/nginx-proxy/) reverse proxy,
* [letsencrypt ](https://hub.docker.com/r/jrcs/letsencrypt-nginx-proxy-companion/) HTTPS provider and
* [letsencrypt](https://hub.docker.com/r/jrcs/letsencrypt-nginx-proxy-companion/) HTTPS provider and
* [watchtower](https://hub.docker.com/r/v2tec/watchtower/) automatic container update.

Please refer to [Use Compose in production](https://docs.docker.com/compose/production/) for more information about
Expand Down
Loading