SocialAggregator is a small project, created to improve skills of working with Django and AngularJS
http://d1yufmp7734ayp.cloudfront.net/
(email sending is not working)
http://docs.socialaggregator-api.surge.sh/
To provide access to your aws account you must define several env variables:
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
In order to deploy the backend in multicontainer Docker environment of [Elastic Beanstalk] (https://aws.amazon.com/elasticbeanstalk/details/) service, you must install and configure ebs-deploy.
For backend deployment used maxbey/socialaggregator_django image, which is also located in socialaggregator/Dockerfile
and can be manually changed by you.
Note that the container has two scenarios: launch gunicorn workers or run celery workers.
The behavior of the container is determined by the CONTAINER_BEHAVIOUR
environment variable.
Out of the box project is configured to work with Sentry, you just have to specify the DSN, define the env variable SENTRY_PRIVATE_DSN
.
To deploy the backend application you must define a set of env variables:
AWS_BEANSTALK_BUCKET_NAME
SECRET_KEY
For deeper understanding, please read about the django secret.
DATABASE_URL
REDIS_URL
Read about URL-based configurations
EMAIL_HOST
EMAIL_HOST_USER
EMAIL_HOST_PASSWORD
Read about email sending configuration in django.
For deeper understanding, please read about the python-social-auth module.
SOCIAL_AUTH_FACEBOOK_KEY
SOCIAL_AUTH_FACEBOOK_SECRET
SOCIAL_AUTH_GITHUB_KEY
SOCIAL_AUTH_GITHUB_SECRET
SOCIAL_AUTH_TWITTER_KEY
SOCIAL_AUTH_TWITTER_SECRET
FRONTEND_URI
(link to the front-end app)FRONTEND_CONFIRMATION_URI
(link to the front-end view for user`s email confirmation)FRONTEND_RESET_PASSWORD_URI
(link to the front-end view for user`s password resetting)
Next, you must perform: ebs-deploy deploy -e yourenvname
To deploy the frontend application it is recommended to use S3 and CloudFront services.
Out of the box project is configured to work with Sentry, you just have to specify the DSN, define the env variable SENTRY_PUBLIC_DSN
.
To build and deploy the front-end application you must define a set of env variables:
BACKEND_HOST
For deeper understanding, please read about the satellizer module.
SOCIAL_AUTH_FACEBOOK_KEY
SOCIAL_AUTH_GITHUB_KEY
AWS_REGION
AWS_CLOUDFRONT_BUCKET
AWS_CLOUDFRONT_DISTRIBUTION
To build the front-end app you must perform:
npm install
npm run-script compile
For frontend deployment written special gulp task that uses gulp-awspublish and gulp-cloudfront-invalidate-aws-publish npm packages.
Next, all that remains to do is to invoke a gulp task: gulp s3deploy