nirgn975 / WhatsBuzz

WhatsBuzz - All the buzz on the internet (Django, Angular2, Google Cloud SDK, Facebook API, etc)
ISC License
5 stars 1 forks source link

Whats Buzz

license Build Status Python 3 Updates Donate

Something about the project.

Our Stack

Tools we use

Pre Requirements

  1. Make sure you have Python 3.x and pip installed.
  2. NodeJS.
  3. Angular CLI.
  4. Google Cloud Platform.

Installation

Client

  1. npm install inside the client directory.
  2. Open the browser at http://localhost:4200.

Server

  1. Install requirements with pip install -r requirements.txt (located under server directory).
  2. cd server/config then cp local_settings.template local_settings.py and modify it by your local settings.
  3. Migrate the data with python manage.py migrate.
  4. Import the dummy data with python manage.py import_data.
  5. Run the server with python manage.py runserver.
  6. Open the browser at http://localhost:8000.

Tests

Client

Server

Translation

Client

Run npm run i18n to create xlf files.

Server

To make new strings for translation use the command

python manage.py makemessages -l he
python manage.py compilemessages -l he

Deploy

Client

  1. Build the project ng build --prod --aot inside the client directory.
  2. Run firebase deploy to deploy to deploy to Firebase.

Server

  1. Migrate the database python manage.py migrate.
  2. Create the admin user python manage.py createsuperuser.
  3. Gather all the static content locally into one folder python manage.py collectstatic.
  4. Make sure STATIC_URL point to your CGP CloudStorage.
  5. To make the bucket public gsutil defacl set public-read gs://<your-gcs-bucket>.
  6. Upload the static content to CloudStorage gsutil rsync -R static/ gs://<your-gcs-bucket>/static.
  7. Add your SECRET_KEY to settings.py.
  8. Make sure your don't have server/config/local_settings.py file.
  9. Deploy the app to CGP app engine gcloud app deploy.