Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 16 additions & 17 deletions docs/contributing/onboarding/dev_environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,11 @@ Before cloning your forked repository to your local machine, you must have Git i

### Install Docker

Install or make sure [docker][docker-install] and [docker compose][docker-compose-install] are installed on your computer.
This lets us run our development environment in containers.

```bash
docker -v
docker compose -v
```
Install using the [recommended installation method for your operating system][docker-install].

The recommended installation method for your operating system can be found [here](https://docs.docker.com/install/).
- Be sure to perform the "post-install" steps as well, as they will allow you to run Docker without `sudo`.

More on using Docker and the concepts of containerization:

Expand Down Expand Up @@ -140,20 +137,21 @@ upstream https://github.com/hackforla/peopledepot.git (push)

1. Make sure the Docker service is running

=== "Docker (Engine)"
```bash
docker ps # (1)!
```

```bash
sudo systemctl status docker
```
1. This should print a list of running containers (it could be empty).

It will show `Active: active (running)` if it's running.
If it is not running you will get the message:

=== "Docker Desktop"
```text
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
```

1. Start Docker Desktop
1. Run `docker container ls` to verify Docker Desktop is running. If it is not running you will get the message: `Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?`
Start Docker or Docker Desktop if the service is not running.

1. Create an .env.docker file from .env.docker-example
1. Create `.env.docker`

```bash
cp ./app/.env.docker-example ./app/.env.docker
Expand All @@ -171,9 +169,10 @@ upstream https://github.com/hackforla/peopledepot.git (push)
docker compose exec web python manage.py createsuperuser --no-input
```

1. Browse to the web admin interface at `http://localhost:8000/admin/` and confirm the admin site is running. Use DJANGO_SUPERUSER_USERNAME and DJANGO_SUPERUSER_PASSWORD from .env.docker for credentials.
This uses `DJANGO_SUPERUSER_USERNAME` and `DJANGO_SUPERUSER_PASSWORD` from `.env.docker` for credentials.

1. Browse to `http://localhost:8000/admin/` to confirm the admin site is running.

See our documentation for [Working with Docker](../tools/docker.md#working-with-docker) for more useful Docker commands.

[docker-compose-install]: https://docs.docker.com/compose/install/
[docker-install]: https://docs.docker.com/get-docker/
Loading