Skip to content

Latest commit

 

History

History
83 lines (55 loc) · 1.99 KB

README_API_INSTALL_DOCKER.md

File metadata and controls

83 lines (55 loc) · 1.99 KB

README for Installation with Docker

Back to root README

Only Docker Desktop is required.

WSL 2 users should follow this guide as well.

Installation

  1. Clone your WeVoteServer fork

    git clone https://github.com/wevote/WeVoteServer.git
    cd WeVoteServer
    
  2. Set environment variables in .env

    # api
    DATABASE_PASSWORD="secret"
    DJANGO_SUPERUSER_EMAIL="[email protected]"
    DJANGO_SUPERUSER_PASSWORD="secret"
    
    # db
    POSTGRES_PASSWORD="secret"
    
  3. Configure PostgreSQL in config.sql

    ALTER SYSTEM SET listen_addresses = '*';

    This setting allows other containers to access the database

  4. Open the following ports, if they are not already open:

    • 4566 to access AWS

    • 5432 to access the database

    • 8000 to access the API

  5. Create and start containers

    docker compose up --detach
    

    Use the --profile flag, if you need AWS

    docker compose --profile optional up --detach
    

    Access the API at http://localhost:8000/

  6. Stop and remove containers

    docker compose down
    

    Use the --volumes flag to remove volumes

    docker compose down --volumes
    

Resources

  1. Docker Compose

  2. Docker Desktop

  3. PostgreSQL

Back to root README