Feature request? Bug?
Don't create an issue on that repository!
Create an issue either on client (if this is related to QuestionIt.space website) either on server (if this is related to API) repository.
Developer environment requires:
- A Docker compatible system
- Docker Compose v2 (Windows/Mac: bundled with Docker Desktop; Linux: see
docker compose
v2 extension for linux)
git clone [email protected]:alkihis/questionit.bootstrap.git bootstrap
cd bootstrap
git clone [email protected]:alkihis/questionit.api-v2.git server
git clone [email protected]:alkihis/questionit.space-v2.git client
Copy bootstrap.env.dist
to bootstrap.env
, and fill it with your own variables.
Warning: Fill bootstrap.env
before starting any container!
docker volume create migrate_mysql_db
docker volume create psql_db
docker volume create redis_single_persist
docker compose up -d postgres
docker compose exec postgres psql -U postgres
CREATE DATABASE questionit;
\c questionit
-- The super user, which can start migrations
CREATE USER questionitsu SUPERUSER PASSWORD 'xxxxx';
-- The regular user, used by the server
CREATE USER questionit NOSUPERUSER NOCREATEDB NOCREATEROLE PASSWORD 'xxxxx';
-- Create unaccent extension
CREATE EXTENSION unaccent;
\q
docker compose build api
docker compose run -e NODE_ENV=development api yarn
# Needed to have dist/ folder
docker compose run -e NODE_ENV=production api yarn build
# Build all empty database tables
docker compose run api yarn run:migration
# Allow usage of db to classic user
docker compose exec postgres psql -U postgres
\c questionit
GRANT CONNECT ON DATABASE questionit TO questionit;
GRANT USAGE, SELECT ON ALL SEQUENCES IN SCHEMA public TO questionit;
GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA public TO questionit;
\q
You're ready to start services!
docker compose up -d web