forked from LD4P/qa_server_aws_deploy
-
Notifications
You must be signed in to change notification settings - Fork 1
Debugging FAQ
E. Lynette Rayle edited this page May 12, 2022
·
5 revisions
- AWS -> Services -> Elastic Container Service
- (left menu) Clusters (under Amazon ECS) - make sure on list view
- Filter: search for qa or possibly lookup
- Click list item: the cluster name
- Click tab: ECS Instances tab (there will be two instances listed in the table)
- Click on instance: the one that has Running tasks == 1
- use Private IP for ssh
ssh -i _PATH_TO_SSH_PEM_ ec2-user@_PRIVATE_IP_
- ssh to machine
- list all docker containers
docker ps
- copy container id for mariadb:latest
- connect to the container
docker exec -it _CONTAINER_ID_ /bin/bash
- startup MySQL CLI
mysql -h localhost -u root -p
Enter password: <get root password from _ENVIRONMENT_.env>
- select the app database
show databases;
use _DB_NAME_ENV_;
show tables;
- ssh to machine
- list all docker containers
docker ps
- copy container id for app:latest
- connect to the container
docker exec -it _CONTAINER_ID_ /bin/bash
- list files - should be in the app root directory
ls
You can run the rails console by executing:
bundle exec rails c
TBD