Activity-leaderboard Backend
git clone https://github.com/mdgspace/activity-leaderboard-backend.git
Change current folder to project folder
cd activity-leaderboard-backend
Create env.list from env.list.example
# Postgres configurations
POSTGRES_HOST=postgres
POSTGRES_USER=sudo
POSTGRES_PASSWORD=sudo
POSTGRES_DB=test
#Redis configuration
REDIS_HOST=redis
REDIS_PASS=
# Github configuration
GITHUB_CLIENT_ID=you github oauth application client id
GITHUB_CLIENT_SECRET=you github oauth application client id
# AWS Configurations
AWS_BUCKET=bucketname
AWS_ACCESS=localstack
AWS_SECRET=localstack
AWS_URL=http://localstack:4566
AWS_REGION=us-east-1
Run Docker compose (In root dierectory)
docker run -d --name localstack --network activity-leaderboard-backend_network -e SERVICES=s3 -p 4566:4566 localstack/localstack
aws --endpoint-url=http://localhost:4566 s3api create-bucket --bucket bucketname --region us-east-1
aws --endpoint-url=http://localhost:4566 s3 ls
Get the ip of locakstack container
docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' localstack
Build backend image(in root dierectory)
docker build -t activity-backend:latest .
docker run --name backend --network activity-leaderboard-backend_network -dp 8080:8080 --env-file env.list activity-backend:latest