Fixing some stuff with README
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
81ff8d0177
commit
88e15974dc
|
@ -3,5 +3,7 @@ POSTGRES_HOST=postgres
|
|||
POSTGRES_PASSWORD=postgres
|
||||
POSTGRES_PORT=5432
|
||||
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
|
||||
DJANGO_ENV=development
|
40
README.md
40
README.md
|
@ -1,12 +1,22 @@
|
|||
# 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 compose
|
||||
- pre-commit (preferred for contributions)
|
||||
|
||||
## Start local server
|
||||
#### Setup
|
||||
|
||||
Given that the requirements above are installed, it should be as easy as:
|
||||
|
||||
|
@ -33,3 +43,29 @@ Make messages:
|
|||
Running tests:
|
||||
|
||||
$ 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
|
||||
|
|
|
@ -15,7 +15,7 @@ services:
|
|||
depends_on:
|
||||
- postgres
|
||||
env_file:
|
||||
- env
|
||||
- .env
|
||||
|
||||
postgres:
|
||||
image: postgres:13-alpine
|
||||
|
@ -24,7 +24,7 @@ services:
|
|||
ports:
|
||||
- 5432:5432
|
||||
env_file:
|
||||
- env
|
||||
- .env
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
|
|
Loading…
Reference in a new issue