Skip to content

Commit

Permalink
ops: allow for multiple instances
Browse files Browse the repository at this point in the history
  • Loading branch information
yanokwa committed May 18, 2021
1 parent d7c4f2a commit 1e1ae07
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ jobs:
command: |
set -x
docker-compose up -d
docker run --network container:nginx \
CONTAINER_NAME=$(docker inspect -f '{{.Name}}' $(docker-compose ps -q nginx) | cut -c2-)
docker run --network container:$CONTAINER_NAME \
appropriate/curl -4 --insecure --retry 30 --retry-delay 10 --retry-connrefused https://localhost/ \
| tee /dev/tty \
| grep -q 'ODK Central'
docker run --network container:nginx \
docker run --network container:$CONTAINER_NAME \
appropriate/curl -4 --insecure --retry 20 --retry-delay 2 --retry-connrefused https://localhost/v1/projects \
| tee /dev/tty \
| grep -q '\[\]'
8 changes: 0 additions & 8 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ services:
POSTGRES_DATABASE: odk
restart: always
mail:
container_name: mail
image: "itsissa/namshi-smtp:4.89-2.deb9u5"
volumes:
- ./files/dkim/config:/etc/exim4/_docker_additional_macros:ro
Expand All @@ -19,7 +18,6 @@ services:
- MAILNAME=${DOMAIN}
restart: always
service:
container_name: service
build:
context: .
dockerfile: service.dockerfile
Expand All @@ -38,7 +36,6 @@ services:
command: [ "./wait-for-it.sh", "postgres:5432", "--", "./start-odk.sh" ]
restart: always
nginx:
container_name: nginx
build:
context: .
dockerfile: nginx.dockerfile
Expand All @@ -56,19 +53,16 @@ services:
test: [ "CMD-SHELL", "nc -z localhost 80 || exit 1" ]
restart: always
pyxform:
container_name: pyxform
image: 'getodk/pyxform-http:v1.5.0'
restart: always
secrets:
container_name: secrets
volumes:
- secrets:/etc/secrets
build:
context: .
dockerfile: secrets.dockerfile
command: './generate-secrets.sh'
enketo:
container_name: enketo
volumes:
- secrets:/etc/secrets
build:
Expand All @@ -84,7 +78,6 @@ services:
- SUPPORT_EMAIL=${SYSADMIN_EMAIL}
enketo_redis_main:
image: redis:5
container_name: enketo_redis_main
volumes:
- ./files/enketo/redis-enketo-main.conf:/usr/local/etc/redis/redis.conf:ro
- enketo_redis_main:/data
Expand All @@ -94,7 +87,6 @@ services:
restart: always
enketo_redis_cache:
image: redis:5
container_name: enketo_redis_cache
volumes:
- ./files/enketo/redis-enketo-cache.conf:/usr/local/etc/redis/redis.conf:ro
- enketo_redis_cache:/data
Expand Down

0 comments on commit 1e1ae07

Please sign in to comment.