Giter VIP home page Giter VIP logo

brave-bucks's Introduction

Brave Bucks

Changelog

2.7.1

Fixed solar system search.

2.7.0

  • Breaking Change: Added KILL_BUDGET and RATTING_BUDGET environment variables.

2.6.1

Added SERVER_PORT environment variable.

2.6.0

Switched to EVE SSOv2

  • Breaking Change: The callback URL changed to http://your.domain.tld/api/callback, adjust on developers.eveonline.com and in the environment variables SSO_URL and WALLET_URL.
  • Breaking Change: The OAuth login URL in the environment variables SSO_URL and WALLET_URL changed to https://login.eveonline.com/v2/oauth/authorize/.

Setup

Create EVE app for development:

Run Docker development environment:

cd src/main/docker
ln -s dev.yml docker-compose.yml
docker-compose up

Import DB dump - replace IP with your host IP, if necessary:

mongorestore --uri mongodb://admin:[email protected]:27017/brave-bucks?authSource=admin --drop --gzip --archive=brave-bucks.archive --nsInclude brave-bucks.*

Start and enter Docker Java container:

cd src/main/docker
docker-compose run --service-ports brave-bucks-java /bin/bash

# second console (find name with "docker ps")
docker exec -it docker_brave-bucks-java_run_f12850ef5370 /bin/bash

Build frontend:

./mvnw install -Dmaven.test.skip=true
ln -s /opt/brave-bucks/node/yarn/dist/bin/yarn /usr/local/bin/yarn
yarn install
yarn build

Run frontend development server:

yarn start

Run backend in development mode - replace *** and your Docker host IP for MongoDB, if necessary:

export SERVER_PORT=8080
export SSO_URL='https://login.eveonline.com/v2/oauth/authorize/?response_type=code&redirect_uri=http%3A%2F%2Flocalhost:8080%2Fapi%2Fcallback&client_id=***&scope=&state=uniquestate123'
export CLIENT_ID=***
export CLIENT_SECRET=***
export WALLET_URL='https://login.eveonline.com/v2/oauth/authorize/?response_type=code&redirect_uri=http%3A%2F%2Flocalhost:8080%2Fapi%2Fcallback&client_id=***&scope=esi-wallet.read_character_wallet.v1&state=wallet'
export WALLET_CLIENT_ID=***
export WALLET_CLIENT_SECRET=***
export MONGO_URI=mongodb://admin:[email protected]:27017/brave-bucks?authSource=admin
export MONGO_DB=brave-bucks
export JWT_SECRET=my-secret-token-to-change-in-production
export KILL_BUDGET=9000000000
export RATTING_BUDGET=2000000000

./mvnw

Build WAR file and Docker container for production mode:

  • Copy src/main/resources/config/application-prod.yml.dist to application-prod.yml
  • If you want use SSL for the web server: create the bucks_keystore.p12 file, change the server.port and activate the server.ssl configuration in application-prod.yml
# run in the Docker Java dev container
./mvnw clean package -Pprod -DskipTests

# run on your host
docker build --no-cache --file src/main/docker/Dockerfile -t brave-bucks target

Run WAR file - replace *** and values for MONGO_URI, MONGO_DB, JWT_SECRET and redirect_uri with your values:

export SERVER_PORT=8080
WALLET_CLIENT_ID=*** \
WALLET_CLIENT_SECRET=*** \
WALLET_URL='https://login.eveonline.com/v2/oauth/authorize/?response_type=code&redirect_uri=http%3A%2F%2Fbucks.bravecollective.com%2Fapi%2Fcallback&client_id=***&scope=esi-wallet.read_character_wallet.v1&state=wallet' \
CLIENT_ID=*** \
CLIENT_SECRET=*** \
SSO_URL='https://login.eveonline.com/v2/oauth/authorize/?response_type=code&redirect_uri=http%3A%2F%2Fbucks.bravecollective.com%2Fapi%2Fcallback&client_id=***&scope=&state=uniquestate123' \
MONGO_URI='mongodb://user:[email protected]:27017/bucks?ssl=true&replicaSet=atlas-xyz-shard&authSource=admin&retryWrites=true&w=majority' \
MONGO_DB=bucks \
JWT_SECRET=my-secret-token-to-change-in-production \
KILL_BUDGET=9000000000 \
RATTING_BUDGET=2000000000 \
java -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:gc.log -XX:+HeapDumpOnOutOfMemoryError \
-XX:HeapDumpPath=/home/bucks/dump.hprof -jar ./target/braveBucks-*.war &

Run Docker container - replace *** and values for MONGO_URI, MONGO_DB, JWT_SECRET and redirect_uri with your values:

docker run \
  --env SERVER_PORT=8080 \
  --env WALLET_CLIENT_ID=*** \
  --env WALLET_CLIENT_SECRET=*** \
  --env WALLET_URL='https://login.eveonline.com/v2/oauth/authorize/?response_type=code&redirect_uri=https%3A%2F%2Fbucks.bravecollective.com%2Fapi%2Fcallback&client_id=***&scope=esi-wallet.read_character_wallet.v1&state=wallet' \
  --env CLIENT_ID=*** \
  --env CLIENT_SECRET=*** \
  --env SSO_URL='https://login.eveonline.com/v2/oauth/authorize/?response_type=code&redirect_uri=https%3A%2F%2Fbucks.bravecollective.com%2Fapi%2Fcallback&client_id=***&scope=&state=uniquestate123' \
  --env MONGO_URI='mongodb://user:[email protected]:27017/bucks?ssl=true&replicaSet=atlas-xyz-shard&authSource=admin&retryWrites=true&w=majority' \
  --env MONGO_DB=bucks \
  --env JWT_SECRET=my-secret-token-to-change-in-production \
  --env KILL_BUDGET=9000000000 \
  --env RATTING_BUDGET=2000000000 \
  --network host \
  --rm brave-bucks

The Docker container is also available at https://hub.docker.com/r/bravecollective/brave-bucks.

brave-bucks's People

Contributors

tkhamez avatar sagatv avatar kitsunet avatar cmd-johnson avatar dependabot[bot] avatar eve-n0rman avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.