git clone [email protected]:lopentusska/postgram.git
cd postgram/
echo '''DB_NAME=postgram_db
POSTGRES_USER=postgram_user
POSTGRES_PASSWORD=postgram_password
DB_HOST=localhost
DB_PORT=5432
DJANGO_SECRET_KEY=your_secret_key
DJANGO_DEBUG=True
DJANGO_ALLOWED_HOSTS=127.0.0.1 localhost
DJANGO_CORS_ALLOWED_ORIGINS=http://localhost:3000 http://127.0.0.1:3000
REDIS_LOCATION=redis://127.0.0.1:6379/1''' > .env
docker compose up -d
docker logs <container_name> -f
docker compose down
sudo su postgres
psql
CREATE DATABASE postgram_db;
CREATE USER postgram_user WITH PASSWORD 'postgram_password';
GRANT ALL PRIVILEGES ON DATABASE postgram_db TO postgram_user;
ALTER USER postgram_user CREATEDB;
cd backend/
python -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
python manage.py migrate
python manage.py runserver
python manage.py createsuperuser
cd frontend/
yarn install
yarn build
yarn start