⚠️ We are migrating to New Implementation -> Chorus and archiving this repo!
Polis is an AI-powered sentiment gathering platform. More organic than surveys and less effort than focus groups.
Polis is a platform for gathering, analyzing, and understanding sentiment at scale. It uses AI to help facilitate large-scale, open-ended discussions.
- For a detailed methods paper, see Polis: Scaling Deliberation by Mapping High Dimensional Opinion Spaces.
- Main Deployment: https://pol.is (Free for nonprofits and governments)
- CivicTech Deployment (This Fork): https://civictech-polis.azurewebsites.net/
- Knowledge Base (Wiki): https://compdemocracy.org/Welcome (Comprehensive user guide)
- Discussions (Q&A): https://github.com/compdemocracy/polis/discussions
- Technical Issues: https://github.com/compdemocracy/polis/issues
- High-Impact Support: mailto:hello@compdemocracy.org (For significant deployments requiring more support)
- Community Support: https://github.com/CivicTechTO/polis/issues
- Talk to a person / Polis 101 : https://civictech.ca (Join CivicTech Hacknight - Ask for a Polis 101)
- CivicTech Slack: https://civictech.ca (Join the
#polischannel)
This section is for those who want to run their own instance of the CivicTech fork of Polis or contribute to development.
Polis comes with Docker infrastructure for running a complete system, whether for a production deployment or a development environment.
Open terminal and enter:
cp example.env .env
make startThat should run docker compose with the development overlay (see below) and default configuration values.
Visit http://localhost:80/createuser 🚀
- Running Polis: See Running Polis below for more details.
- Configuration: See
docs/configuration.mdfor deployment configuration. - Deployment: See
docs/deployment.mdfor deployment bash commands. - Contributing: See CONTRIBUTING.md for how to contribute upstream polis main repository.
- Contributing: See our wiki for how to contribute to this fork.
Polis uses Docker and Docker Compose for easy setup.
- Docker and Docker Compose installed. Instructions for avoiding
sudowith Docker.
- Start (Development):
make start(Equivalent todocker compose --profile postgres up) - Start (Rebuild):
make start-rebuild(Rebuilds Docker images) - Start (Production - see docs/deployment.md for complete instructions):
make PROD start(Requiresprod.env) - Stop:
make stop(Equivalent todocker compose --profile postgres down) - Help:
make help(Lists available commands) - View Configuration:
docker compose --profile postgres convert - Full Rebuild (Use with caution - wipes database):
make start-FULL-REBUILD
See Using a local or remote (non-docker) database below
For development, use the following command to enable live code reloading, debugging, and other conveniences:
docker compose -f docker-compose.yml -f docker-compose.dev.yml --profile postgres up --buildThis enables:
- Live code reloading and static type checking of the server code
- A nREPL connection port open for connecting to the running math process
- Ports open for connecting directly to the database container
About docker compose overlay file:
docker-compose.dev.ymlin above command is an overlay file, which layers the developer conveniences describe above into the base system, as described in thedocker-compose.ymlfile.- You can create your own
docker-compose.x.ymlfile as an overlay and add or modify any values you need to differ from the defaults found in thedocker-compose.ymlfile and pass it as the second argument to thedocker compose -fcommand above. - You can specify these
-f docker-compose.yml -f docker-compose.dev.ymlarguments for anydockercommand which you need to take advantage of these features (not justdocker compose --profile postgres up).
Omit the --profile postgres flag to use a local or remote database. You will need to set the DATABASE_URL environment variable in your .env file to point to your database.
When using make commands, setting POSTGRES_DOCKER to true or false will determine whether to automatically include --profile postgres when it calls out to docker compose.
- End-to-End (E2E) Tests: See
e2e/README.mdfor instructions on running automated browser tests.
- Docker Issues: Try restarting Docker, killing all containers, or using
make start-FULL-REBUILD(WARNING: This wipes the database). - NPM Issues: See this issue for potential solutions.
- Apple Silicon (M1/M2) Issues: You may need to use a Rosetta terminal for some dependencies.