Skip to content

acmucsd-projects/acm-profiles-api

Repository files navigation

acm-profiles-api

ACM Profiles API (Side Projects Sage Team)

REST API for ACM Profiles. Built using Django and PostgreSQL.

Unfortunately Heroku is taking down their free tier so the hosted version of this API will no longer be functional.

Required Dependencies

  1. Python 3 and pip - instructions
  2. Docker - instructions
  3. docker-compose - instructions
  4. PostgreSQL - instructions

Build instructions

  1. Install pipenv, a tool which automates virtual environments for python.
  2. Clone the repository: git@github.com:acmucsd/acm-profiles-api.git
  3. Navigate to the project directory: cd acm-profiles-api
  4. Create .env file, using .env.example as a template : cp .env.example .env.
  5. Fill out the .env. See the example file below.
  6. Run pipenv sync to install all the dependencies and pipenv shell to activate the virtual environment.
  7. Run the docker container: docker-compose up -d.
  8. Make migrations to the database: python manage.py migrate.
  9. Load the test data: python manage.py loaddata */fixtures/*.json.
  10. Run the local testing server: python manage.py runserver.
  11. Follow setup instructions for the membership portal api

Make sure that your databases for acm profiles and the membership portal are running on different ports. As a suggestion, use 5433 for acm profiles and 5432 for the membership portal. The two servers need to run on different ports as well. ACM profiles defaults to 8000, so run the membership portal on a different port, such as 3000.

Sample .env file:

SECRET_KEY=secret_key
DATABASE_URL='postgres://user:password@localhost:5433/name'
DOCKER_DB_PORT='5433'
DOCKER_DB_NAME='name'
DOCKER_DB_USER='user'
DOCKER_DB_PASSWORD='password'
MEMBERSHIP_PORTAL_API='http://localhost:3000/'
FRONT_END_URL='http://localhost:3005'
HOST=127.0.0.1
DEBUG=True

About

ACM Profiles API (Side Projects Sage Team)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published