Skip to content

Commit c5252dc

Browse files
authored
Merge pull request #3159 from chaoss/docker-docs
Update documentation to new docker compose
2 parents f2b5956 + bbbf731 commit c5252dc

7 files changed

Lines changed: 117 additions & 51 deletions

File tree

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ Contributors
118118
- `Georg J.P. Link <https://github.com/GeorgLink/>`_
119119
- `Gary P White <https://github.com/garypwhite/>`_
120120

121+
GSoC 2025 Participants
122+
-----------------------
123+
121124
GSoC 2022 participants
122125
-----------------------
123126
- `Kaxada <https://github.com/kaxada>`_

docs/source/docker/docker.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Docker
1+
Docker Image Breakdown
22
=================
33

44
Augur provides a separate Docker image for each layer of our application (database, backend, and frontend). This section details how to build and run these images locally for testing, and also describes how to set up our test environment using Docker.

docs/source/docker/getting-started.rst

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,47 @@ The rest of this section of the documentation assumes you have a working install
2020

2121
If you are less familiar with Docker, or experience issues you cannot resolve attempting our "quick start", please follow the instructions in this section, and the next few pages, to set up your environment.
2222

23+
Docker Compose
24+
------------
25+
26+
For quickest start up, set up Docker or Podman desktop with a machine with roughly
27+
the following resources (or more):
28+
29+
- 8 CPUs
30+
- 100 GB disk
31+
- 10 GB RAM
32+
33+
Clone the Augur repository and create a .env file in the top level directory
34+
with the following fields:
35+
36+
.. code:: python
37+
38+
AUGUR_DB=augur
39+
AUGUR_DB_USER=augur
40+
AUGUR_DB_PASSWORD=password_here
41+
42+
AUGUR_GITHUB_API_KEY=ghp_value_here
43+
AUGUR_GITHUB_USERNAME=gh_username
44+
AUGUR_GITLAB_API_KEY=placeholder
45+
AUGUR_GITLAB_USERNAME=placeholder
46+
47+
Then run:
48+
49+
.. code:: shell
50+
51+
docker compose up --build
52+
53+
or
54+
55+
.. code:: shell
56+
57+
podman compose up --build
58+
59+
And augur should be up and running!
60+
2361
Credentials
2462
------------
25-
Before you get started with Docker, you'll need to set up a PostgreSQL instance either locally or using a remote host. Alternatively, you can also set up the database within a docker container either manually or through docker compose.
63+
If you want to create a DB outside of using Docker/Podman Compose, you'll need to set up a PostgreSQL instance either locally or using a remote host.
2664

2765
.. note::
2866

@@ -39,7 +77,7 @@ If you don't care if your data doesn't get persisted or are doing local developm
3977

4078
.. warning::
4179

42-
Using a Docker container as a production database is `not recommended <https://vsupalov.com/database-in-docker/>`_. You have been warned!
80+
There are conflicting opinions on using Docker for a production database.
4381

4482
If you're more interested in doing local development, we recommend using our Docker testing environment image - more on that later.
4583

docs/source/docker/quick-start.rst

Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,36 @@ Before you get off to such a quick start, go ahead and
99
1010
git checkout dev
1111
12-
4. Usually, we'll have you checkout the `dev` branch.
13-
5. Make sure to install all the pre-requisites here: https://oss-augur.readthedocs.io/en/main/getting-started/installation.html#dependencies
12+
4. Create a .env file in the top level directory with the following fields:
1413

14+
.. code:: python
15+
16+
AUGUR_DB=augur
17+
AUGUR_DB_USER=augur
18+
AUGUR_DB_PASSWORD=password_here
19+
20+
AUGUR_GITHUB_API_KEY=ghp_value_here
21+
AUGUR_GITHUB_USERNAME=gh_username
22+
AUGUR_GITLAB_API_KEY=placeholder
23+
AUGUR_GITLAB_USERNAME=placeholder
24+
25+
5. Build the container using one of the following commands:
26+
27+
.. code:: shell
28+
29+
docker compose up --build
30+
31+
or
32+
33+
.. code:: shell
34+
35+
podman compose up --build
36+
37+
And augur should be up and running!
1538

1639
.. note::
1740

18-
**Quick Start**:
41+
**Running against an external database**:
1942

2043
If you want to start running docker against an external database right away:
2144

@@ -34,11 +57,14 @@ Before you get off to such a quick start, go ahead and
3457

3558
.. code-block::
3659
37-
AUGUR_GITHUB_API_KEY=xxxxxxxxxxxxxxxxxxxxxxx
38-
AUGUR_GITHUB_USERNAME=usernameGithub
39-
AUGUR_GITLAB_API_KEY=xxxxxxxxxxxxxxxxxxxxxxx
40-
AUGUR_GITLAB_USERNAME=usernameGitlab
41-
AUGUR_DB=yourDBString
60+
AUGUR_DB=augur
61+
AUGUR_DB_USER=augur
62+
AUGUR_DB_PASSWORD=password_here
63+
64+
AUGUR_GITHUB_API_KEY=ghp_value_here
65+
AUGUR_GITHUB_USERNAME=gh_username
66+
AUGUR_GITLAB_API_KEY=placeholder
67+
AUGUR_GITLAB_USERNAME=placeholder
4268
4369
4. Execute the code from the base directory of the Augur repository:
4470

docs/source/getting-started/dev-osx-install.rst

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -598,23 +598,3 @@ You can stop augur with ``augur backend stop``, followed by
598598
so Augur can shutdown more gently. There is no issue with data integrity
599599
if you issue them seconds apart, its just that stopping is nicer than
600600
killing.
601-
602-
Docker
603-
~~~~~~
604-
605-
1. Make sure docker, and docker compose are both installed
606-
2. Modify the ``environment.txt`` file in the root of the repository to
607-
include your GitHub and GitLab API keys.
608-
3. If you are already running postgresql on your server you have two
609-
choices:
610-
611-
- Change the port mappings in the ``docker-compose.yml`` file to
612-
match ports for Postgresql not currently in use.
613-
- Change to variables in ``environment.txt`` to include the correct
614-
values for your local, non-docker-container database.
615-
616-
4. ``sudo docker build -t augur-new -f docker/backend/Dockerfile .``
617-
5. ``sudo docker compose --env-file ./environment.txt --file docker-compose.yml up``
618-
to run the database in a Docker Container or
619-
``sudo docker compose --env-file ./environment.txt --file docker-compose.yml up``
620-
to connect to an already running database.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
Docker Compose
2+
===========
3+
For quickest start up, set up Docker or Podman desktop with a machine with roughly
4+
the following resources (or more).
5+
6+
- 8 CPUs
7+
- 100 GB disk
8+
- 10 GB RAM
9+
10+
1. Clone the Augur repository https://github.com/chaoss/augur
11+
12+
13+
2. Create a .env file in the top level directory with the following fields:
14+
15+
.. code:: python
16+
17+
AUGUR_DB=augur
18+
AUGUR_DB_USER=augur
19+
AUGUR_DB_PASSWORD=password_here
20+
21+
AUGUR_GITHUB_API_KEY=ghp_value_here
22+
AUGUR_GITHUB_USERNAME=gh_username
23+
AUGUR_GITLAB_API_KEY=placeholder
24+
AUGUR_GITLAB_USERNAME=placeholder
25+
26+
3. Build the container using one of the following commands:
27+
28+
.. code:: shell
29+
30+
docker compose up --build
31+
32+
or
33+
34+
.. code:: shell
35+
36+
podman compose up --build
37+
38+
And augur should be up and running!

docs/source/quick-start.rst

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Select installation instructions from those most closely related to the operatin
88

99
getting-started/new-install
1010
getting-started/dev-osx-install
11+
getting-started/using-docker
1112

1213

1314
Explanations of Technologies
@@ -154,24 +155,4 @@ so Augur can shutdown more gently. There is no issue with data integrity
154155
if you issue them seconds apart, its just that stopping is nicer than
155156
killing.
156157

157-
Docker
158-
~~~~~~
159-
160-
1. Make sure docker, and docker compose are both installed
161-
2. Modify the ``environment.txt`` file in the root of the repository to
162-
include your GitHub and GitLab API keys.
163-
3. If you are already running postgresql on your server you have two
164-
choices:
165-
166-
- Change the port mappings in the ``docker-compose.yml`` file to
167-
match ports for Postgresql not currently in use.
168-
- Change to variables in ``environment.txt`` to include the correct
169-
values for your local, non-docker-container database.
170-
171-
4. ``sudo docker build -t augur-new -f docker/backend/Dockerfile .``
172-
5. ``sudo docker compose --env-file ./environment.txt --file docker-compose.yml up``
173-
to run the database in a Docker Container or
174-
``sudo docker compose --env-file ./environment.txt --file docker-compose.yml up``
175-
to connect to an already running database.
176-
177158

0 commit comments

Comments
 (0)