- JDK 21
- Node.js 21
- Stripe API keys
- GCP project
- GCS bucket with public access
- GCP service account with access to the bucket
In order to run the whole application with docker compose, you need to follow the steps below:
- Set
REACT_STRIPE_PUBLISHABLE_KEY
andSTRIPE_SECRET_KEY
in .env file with your Stripe API keys - Add or replace GCP service account secret key JSON file in ./volumes/restaurant-service directory
- Set
GCP_STORAGE_BUCKET_NAME
,GCP_STORAGE_PROJECT_ID
andGCP_KEY_FILE_NAME
in .env with your GCP bucket name, project id and Service account secret key file name - Run docker compose
run docker-compose up
In order to run the application in development mode to add new features, you need to follow the steps below:
- Install all modules
install food-ordering-system modules
or runmvn clean install -DskipTests -P install-frontends
- Set
REACT_STRIPE_PUBLISHABLE_KEY
default value in food-ordering-app envVars.js - Set
STRIPE_API_KEY
with your Stripe secret key in payment service application-dev.properties - Move GCP service account secret key to restaurant-service resources
- Set
GCP_STORAGE_BUCKET_NAME
,GCP_STORAGE_PROJECT_ID
andGCP_CREDENTIALS_LOCATION
in restaurant service application-dev.properties - Run docker compose dev
run docker-compose.dev up
- Run the application
start food-ordering-system
You can use Terraform to create whole GCP infrastructure. You need to have Terraform installed on your machine and follow the steps below:
- Move to the gcp-infrastructure-tf directory
- Copy your GCP service account secret key to the credentials.json file
- Rename terraform.tfvars.example
to
terraform.tfvars
and set the required variables - Run
terraform init
- Run
terraform apply
If you encounter any issues related to service API activation, you will need to enable the required APIs manually.