- Docker
- PostgreSQL -> if you want to run without docker compose
- NodeJS
- NestJS/cli
- Bash
Step 1. sudo su -U postgres psql
Step 2. CREATE DATABASE sex_adapt;
Step 3. CREATE USER sexadapt WITH PASSWORD 'sexadapt';
Step 4. GRANT ALL PRIVILEGES ON DATABASE sex_adapt TO sexadapt;
Docker will be running on port 5432 (default)
Docker container default name is sex-adapt-backend-db
Setup after installing docker:
1. sudo docker compose up or docker compose up
1. bash ./start.sh
2. yarn install @nestjs/cli && yarn
Docker will be running on host localhost (default)
Docker will be running on port 5432 (default)
Docker container default name is postgres-sex-adapt
Docker will be running on host db (default)
Docker will be running on port 35000 (default)
Docker container default name is sex-adapt-backend-db
- ECONNREFUSED ::1:5432
- Docker might not be running
- Solution 1:
sudo service run docker
; - Solution 2: Check your firewall;
- Solution 1:
- Docker might not be running
- error: database "sex_adapt" does not exist
- Database wasn't created
- Solution:
- Execute
docker exec -it postgres-sex-adapt psql -U postgres
; - Execute
CREATE DATABASE "sex_adapt"
; - Quit with \q and try again;
- Execute
- Solution:
- Database wasn't created
- error: database "sex_adapt" already exists
- Database is duplicated
- Solution:
- Restart sex-adapt-backend-db container with:
docker run sex-adapt-backend-db
- Restart sex-adapt-backend-db container with:
- Solution:
- Database is duplicated