Repo | Access | Tags |
---|---|---|
.github | read | |
aad-docker | private | |
aad-sdk | private | |
aad-bot | private | |
aad-client | private | Coming Soon |
If you have any ideas for something that should be added to Album A Day, feel free to submit an issue as described below.
Code contributions are only being accepted by CODEOWNERS at the moment.
NOTE: You will need to have a GitHub account to be able to submit issues.
To submit issues, head to the .github public repository in this organization, then navigate to the Issues tab.
The active Kanban board for the B2EMO Bot can be here.
Make sure you have the following in place within your aad-docker folder
aad-docker:
- env
- aad-bot
- .env.local
- .env.staging
- .env.production
- google-creds.json
- aad-sdk
- .env.local
- .env.staging
- .env.production
The contents of which, well, I can't tell you that!
After first connection via SSH:
ssh -i $AAD_PEM $AAD_EC2_USER@<EC2_INSTANCE_IPv4_DNS>
You'll want to run the following commands for your first visit to the EC2 instance via SSH:
# Open session to your EC2 instance
ssh -i $AAD_PEM $AAD_EC2_USER@<EC2_INSTANCE_IPv4_DNS>
# --
sudo yum update -y
sudo amazon-linux-extras install docker
sudo service docker start
sudo usermod -a -G docker ec2-user
# Close session
exit
# Open new session to the same EC2 instance
ssh -i $AAD_PEM $AAD_EC2_USER@<EC2_INSTANCE_IPv4_DNS>
# --
# Test permissions for docker
docker ps
# Login to Docker
docker login
# Install and confirm docker-compose is working
sudo curl -L https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose version
# Make necessary directories for deployment
mkdir env; cd env; mkdir aad-bot; mkdir aad-sdk;
# Close session
exit
Now you're all set for Deployment
Copy the proper files for running the Bot and SDK images correctly:
scp -i $AAD_PEM $AAD_DOCKER_DIR/docker-compose-production.yml $AAD_EC2_USER@$AAD_PRODUCTION_EC2:.
scp -i $AAD_PEM $AAD_DOCKER_DIR/env/aad-sdk/.env.production $AAD_EC2_USER@$AAD_PRODUCTION_EC2:./env/aad-sdk/.env.production
scp -i $AAD_PEM $AAD_DOCKER_DIR/env/aad-bot/.env.production $AAD_EC2_USER@$AAD_PRODUCTION_EC2:./env/aad-bot/.env.production
scp -i $AAD_PEM $AAD_DOCKER_DIR/env/aad-bot/google-creds.json $AAD_EC2_USER@$AAD_PRODUCTION_EC2:./env/aad-bot/google-creds.json
Login to the Staging EC2 instance:
ssh -i $AAD_PEM $AAD_EC2_USER@$AAD_PRODUCTION_EC2
Run docker-compose:
docker-compose -f docker-compose-production.yml up --build --detach
To check the status:
docker ps
To check the logs of each container created:
docker container logs aad-bot
docker container logs aad-sdk
To stop either the containers:
docker stop aad-bot
docker stop aad-sdk
Copy the proper files for running the Bot and SDK images correctly:
scp -i $AAD_PEM $AAD_DOCKER_DIR/docker-compose-staging.yml $AAD_EC2_USER@$AAD_STAGING_EC2:.
scp -i $AAD_PEM $AAD_DOCKER_DIR/env/aad-sdk/.env.staging $AAD_EC2_USER@$AAD_STAGING_EC2:./env/aad-sdk/.env.staging
scp -i $AAD_PEM $AAD_DOCKER_DIR/env/aad-bot/.env.staging $AAD_EC2_USER@$AAD_STAGING_EC2:./env/aad-bot/.env.staging
scp -i $AAD_PEM $AAD_DOCKER_DIR/env/aad-bot/google-creds.json $AAD_EC2_USER@$AAD_STAGING_EC2:./env/aad-bot/google-creds.json
Login to the Staging EC2 instance:
ssh -i $AAD_PEM $AAD_EC2_USER@$AAD_STAGING_EC2
Run docker-compose:
docker-compose -f docker-compose-staging.yml up --build --detach
To check the status:
docker ps
To check the logs of each container created:
docker container logs aad-bot-staging
docker container logs aad-sdk-staging
To stop either the containers:
docker stop aad-bot-staging
docker stop aad-sdk-staging
Run the following to get the latest images:
docker pull mattgrantumich/album-a-day:aad-bot-latest
docker pull mattgrantumich/album-a-day:aad-sdk-latest
To develop, run the following command:
docker-compose -f $AAD_DOCKER_DIR/docker-compose-local.yml up
Assuming you have all the correct files, values, and Docker configured, you should be able to access L2EMO!