Fixing some stuff with README
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Víðir Valberg Guðmundsson 2023-10-02 20:10:24 +02:00
parent 81ff8d0177
commit 88e15974dc
3 changed files with 42 additions and 4 deletions

View File

@ -3,5 +3,7 @@ POSTGRES_HOST=postgres
POSTGRES_PASSWORD=postgres POSTGRES_PASSWORD=postgres
POSTGRES_PORT=5432 POSTGRES_PORT=5432
DATABASE_URL=postgres://postgres:postgres@postgres:5432/postgres DATABASE_URL=postgres://postgres:postgres@postgres:5432/postgres
# Use something along the the following if you are not using docker
# DATABASE_URL=postgres://postgres:postgres@localhost:5432/datacoop_membersystem
DEBUG=True DEBUG=True
DJANGO_ENV=development DJANGO_ENV=development

View File

@ -1,12 +1,22 @@
# member.data.coop # member.data.coop
## Development requirements ## Development
### Setup environment
Copy over the .env.example file to .env and adjust DATABASE_URL accordingly
$ cp .env.example .env
### Docker
#### Requirements
- Docker - Docker
- Docker compose - Docker compose
- pre-commit (preferred for contributions) - pre-commit (preferred for contributions)
## Start local server #### Setup
Given that the requirements above are installed, it should be as easy as: Given that the requirements above are installed, it should be as easy as:
@ -33,3 +43,29 @@ Make messages:
Running tests: Running tests:
$ make test $ make test
### Non-docker
Create a venv
$ python3 -m venv venv
Activate the venv
$ source venv/bin/activate
Install requirements
$ pip install -r requirements/dev.txt
Run migrations
$ ./src/manage.py migrate
Create a superuser
$ ./src/manage.py createsuperuser
Run the server
$ ./src/manage.py runserver

View File

@ -15,7 +15,7 @@ services:
depends_on: depends_on:
- postgres - postgres
env_file: env_file:
- env - .env
postgres: postgres:
image: postgres:13-alpine image: postgres:13-alpine
@ -24,7 +24,7 @@ services:
ports: ports:
- 5432:5432 - 5432:5432
env_file: env_file:
- env - .env
volumes: volumes:
postgres_data: postgres_data: