German grammar tree visualizer.
This repository purpose is:
- POC new features of rails 7: hotwire, turbo drive, frame, streams, stymulus.
- POC new featuers of ruby 3.x type system tools like rbs, steep & typeprof.
- Visualize a Grammar Tree of a sentence in German using ParZu.
See infra repo, using terraform and gorillalogiclabs AWS Account
https://github.com/gorillalogic/langwire-infra
- ruby 3.1.2, It is recommended to use rbenv as version manager.
- ParZu Grammar Tree Parser, which is available here https://github.com/rsennrich/ParZu. To pull the image:
docker pull rsennrich/parzu
It uses AWS ECR (Elastic Container Registry), to setup run:
aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin <aws-account-id>.dkr.ecr.us-east-1.amazonaws.com
then, to build and push:
docker build . --tag <aws-account-id>.dkr.ecr.us-east-1.amazonaws.com/langwire
docker push <aws-account-id>.dkr.ecr.us-east-1.amazonaws.com/langwire
to deploy, run on the infra repository:
terraform apply -replace="aws_ecs_task_definition.main"
To fetch the ip used to access the server, run on the infra repository ./describe-ip.sh
- Clone the repo
git clone [email protected]:gorillalogic/langwire.git
- Run the following commands either locally or inside a container:
bundle install
bundle exec rake db:create
bundle exec rake db:schema:load
- To run tests
bundle exec rspec
- If the S3 bucket or the container repository fail to be provisioned because they already exist, we can import them into the local terraform state:
terraform import aws_s3_bucket.bucket langwire-labs
terraform import aws_ecr_repository.main langwire
- If terraform fails because of missing sso options in the aws profile files, this is because the aws provider only supports legacy sso configurations at the time. See https://www.reddit.com/r/aws/comments/zk456d/new_aws_cli_and_sso_sessions_profiles_and_legacy/
- Replace sqlite(default) with DynamoDB. Done
- CI/CD