Git Product home page Git Product logo

vx-template-app's Introduction

Vx Template App

Software Requirements

  • Install Rust. Using Rustup Run the following in your terminal, then follow the onscreen instructions:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  • Install trunk and wasm-bindgen-cli
cargo install --locked trunk
cargo install wasm-bindgen-cli
$ curl -L https://github.com/hasura/graphql-engine/raw/stable/cli/get.sh | VERSION=v2.0.8 bash

or the one that is being used in the docker-compose file. You can also update by running

$ hasura update-cli --version v2.0.8

Developer Setup

  1. Clone the project
$ git clone [email protected]:VertexStudio/vx-template-app
  1. Copy the environment file as .env
$ cp .env.example .env
  1. Run the development environment with docker-compose
$ docker-compose -f docker-compose.dev.yaml up -d
  1. Update schema.graphql
# Uncomment in the update_schema.sh
#source '.env'
# Make the update_schema.sh executable
chmod +x update_schema.sh
# Run it
./update_schema.sh
  1. Serve the Rust app with trunk
trunk serve

Run the Dockerfile of the Rust app

  • Run the production environment with docker-compose instead of the development environment (Replaces Step 3)
$ docker-compose up -d

Services

Service Name Description URL
vx-template Template app with Rust (Yew Framework) http://localhost:8080
Hasura GraphQL Instant GraphQL on all your data (API) http://localhost:8079
Keycloak Open Source Identity and Access Management (Auth) http://localhost:8078
Odoo Business Platform (ERP) http://localhost:8069
PostgreSQL Powerful, open source object-relational database http://localhost:5432 (Dev only)

Docker settings

After creating the services containers using Docker Compose: In order to make the Keycloak data persistent in the assigned volume for the Postgres service, you need to stop the containers, set the command in the Docker-compose file, then start the containers again.

'-Dkeycloak.migration.strategy=IGNORE_EXISTING'

Environment configuration

  • Default environment file: .env
  • Example environment file: .env.example
Environment variables [Table]
Variable Name Description
HASURA_ENDPOINT Hasura API Url
HASURA_WS_ENDPOINT Hasura WS API Url
DATABASE_HOST Postgres database host
POSTGRES_USER Postgres default user
POSTGRES_PASSWORD Postgres default password
POSTGRES_DB Postgres default database name
HOST_ODOO Address of postgres server for Odoo
USER_ODOO Odoo postgres username
POSTGRES_PASSWORD_ODOO Odoo postgres password
DB_VENDOR Database management vendor
DB_ADDR Address of postgres server for Keycloak
DB_DATABASE Keycloak postgres database name
DB_SCHEMA Keycloak postgres schema name
DB_PASSWORD Keycloak postgres database password
KEYCLOAK_USER Keycloak default username
KEYCLOAK_PASSWORD Keycloak default password
HASURA_GRAPHQL_DATABASE_URL Postgres Database Url
HASURA_GRAPHQL_ADMIN_SECRET Hasura GraphQL Admin Secret
KEYCLOAK_PUBLIC_KEY Keycloak RS256 public key
HASURA_GRAPHQL_JWT_SECRET JWT secret key

vx-template-app's People

Contributors

carloslopezandara avatar dennyschico100 avatar jonathanjflores avatar lantoniogc avatar orlando-sanchez avatar rozgo 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.