Skip to content

Commit

Permalink
docs: update all container names and add maintenance mode instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
axelstudios committed Jan 14, 2021
1 parent a437891 commit 8f2afea
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 12 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
# Currently GH Actions provides no simple method for "sharing"
# our setup steps. Ideally this would be in an action, but we would need to use
# actions inside of our actions which you cannot currently do (see https://github.com/actions/runner/issues/438)
#
#
# As a result, the DRYest method for now is to use a testing matrix and
# use conditional steps for actually running the tests.
unittests:
Expand Down Expand Up @@ -42,9 +42,9 @@ jobs:
-
name: Setup SEED
run: |
docker exec seed_web_1 ./manage.py migrate
docker exec seed_web_1 ./manage.py create_default_user [email protected] --password=demo123
docker exec seed_web_1 /bin/bash -c 'echo "y" | ./manage.py make_superuser --user [email protected]'
docker exec seed_web ./manage.py migrate
docker exec seed_web ./manage.py create_default_user [email protected] --password=demo123
docker exec seed_web /bin/bash -c 'echo "y" | ./manage.py make_superuser --user [email protected]'
-
uses: actions/setup-node@v1
-
Expand All @@ -63,10 +63,10 @@ jobs:
SEED_PM_PW: ${{ secrets.SEED_PM_PW }}
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: |
docker exec seed_web_1 touch /seed/config/settings/local_untracked.py
docker exec --env SEED_PM_UN --env SEED_PM_PW seed_web_1 coverage run manage.py test seed --settings=config.settings.docker_dev
docker exec seed_web touch /seed/config/settings/local_untracked.py
docker exec --env SEED_PM_UN --env SEED_PM_PW seed_web coverage run manage.py test seed --settings=config.settings.docker_dev
if [[ ! -z "${COVERALLS_REPO_TOKEN}" ]]; then
docker exec --env COVERALLS_REPO_TOKEN seed_web_1 coveralls
docker exec --env COVERALLS_REPO_TOKEN seed_web coveralls
else
echo "INFO: Env var COVERALLS_REPO_TOKEN was not found, skipping coveralls update"
fi
Expand All @@ -83,8 +83,8 @@ jobs:
name: Test API
if: ${{ matrix.test_env == 'api' }}
run: |
docker exec seed_web_1 ./manage.py create_test_user_json --username [email protected] --host http://localhost --file ./seed/tests/api/api_test_user.json
docker exec seed_web_1 python seed/tests/api/test_seed_host_api.py --noinput --nofile
docker exec seed_web ./manage.py create_test_user_json --username [email protected] --host http://localhost --file ./seed/tests/api/api_test_user.json
docker exec seed_web python seed/tests/api/test_seed_host_api.py --noinput --nofile
formatting:
runs-on: ubuntu-latest
strategy:
Expand Down
7 changes: 6 additions & 1 deletion docker-compose.build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,21 @@
version: '3.4'
services:
db-postgres:
container_name: seed_postgres
image: timescale/timescaledb-postgis:latest-pg12
db-redis:
container_name: seed_redis
image: redis:5.0.1
web:
container_name: seed_web
image: seedplatform/seed:latest
build: .
web-celery:
container_name: seed_celery
image: seedplatform/seed:latest
build: .
oep-city-1:
oep-city:
container_name: seed_oep
image: seedplatform/oep:1.6
depends_on:
- web
Expand Down
3 changes: 3 additions & 0 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@
version: '3.4'
services:
db-postgres:
container_name: seed_postgres
volumes:
- ref_seed_pgdata:/var/lib/postgresql/data
web:
container_name: seed_web
image: seedplatform/seed:dev
build:
context: .
Expand All @@ -24,6 +26,7 @@ services:
- ./seed/:/seed/seed/
- ./config:/seed/config/
web-celery:
container_name: seed_celery
image: seedplatform/seed:dev
build:
context: .
Expand Down
5 changes: 5 additions & 0 deletions docker-compose.local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
version: '3.4'
services:
db-postgres:
container_name: seed_postgres
image: 127.0.0.1:5000/postgres-seed
environment:
- POSTGRES_DB
Expand All @@ -34,6 +35,7 @@ services:
max_attempts: 3
window: 120s
db-redis:
container_name: seed_redis
image: 127.0.0.1:5000/redis
logging:
options:
Expand All @@ -47,6 +49,7 @@ services:
max_attempts: 3
window: 120s
web:
container_name: seed_web
image: 127.0.0.1:5000/seed
environment:
- AWS_ACCESS_KEY_ID
Expand Down Expand Up @@ -85,6 +88,7 @@ services:
max_attempts: 3
window: 120s
web-celery:
container_name: seed_celery
image: 127.0.0.1:5000/seed
environment:
- POSTGRES_DB
Expand Down Expand Up @@ -116,6 +120,7 @@ services:
window: 120s
#oep-city-1:
# This is a placeholder. If needed, follow the instructions to enable: https://cloud.docker.com/u/seedplatform/repository/docker/seedplatform/oep
#container_name: seed_oep
#image: 127.0.0.1:5000/oep
#environment:
# - OEP_DISABLED=true
Expand Down
11 changes: 11 additions & 0 deletions docs/source/developer_resources.rst
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,17 @@ fields. Follow the steps below to add new fields to the SEED database:
#. Test import workflow with mapping to new fields


NginX Notes
-----------

Toggle *maintenance mode* to display a maintenance page and prevent access to all site resources including API endpoints:

.. code-block:: Bash
docker exec seed_web ./docker/maintenance.sh on
docker exec seed_web ./docker/maintenance.sh off
AngularJS Integration Notes
---------------------------

Expand Down
4 changes: 2 additions & 2 deletions docs/source/setup_docker.rst
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ While the containers are running (ie after running the docker-compose up command

.. code-block:: bash
docker exec -it seed_web_1 python manage.py test --settings config.settings.docker_dev
docker exec -it seed_web ./manage.py test --settings config.settings.docker_dev
Add the setting :code:`--nocapture` in order to see :code:`stdout` while running tests. You will need to do this in order to make use of debugging as described below or the output to your debug commands will not display until after the break point has passed and the tests are finished.

Expand All @@ -140,7 +140,7 @@ To connect to the remote session, run netcat from inside the container (using th

.. code-block:: bash
docker exec -it seed_web_1 nc 127.0.0.1:41653
docker exec -it seed_web nc 127.0.0.1:41653
.. _MacPorts: https://www.macports.org/
.. _Homebrew: http://brew.sh/
Expand Down

0 comments on commit 8f2afea

Please sign in to comment.