Skip to content

Commit

Permalink
Update server_host and compose files
Browse files Browse the repository at this point in the history
  • Loading branch information
sabrina0822 authored and kqct committed Aug 24, 2023
1 parent a0d2664 commit c00420f
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
TZ=America/Toronto
SERVER_HOST=rodan.dev.simssa.ca
SERVER_HOST=localhost
2 changes: 0 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ copy_docker_tag:
@docker image tag $(docker images ddmal/rodan-gpu-celery:nightly -q) ddmal/rodan-gpu-celery:$(tag)

pull_prod:
docker pull ddmal/hpc-rabbitmq:$(PROD_TAG)
docker pull ddmal/iipsrv:nightly
docker pull ddmal/nginx:$(PROD_TAG)
docker pull ddmal/postgres-plpython:$(PROD_TAG)
Expand Down Expand Up @@ -180,7 +179,6 @@ scale:
@docker service scale rodan_redis=$(num)
# @docker service scale rodan_postgres=$(num)
@docker service scale rodan_rabbitmq=$(num)
@docker service scale rodan_hpc-rabbitmq=$(num)

health:
@docker inspect --format "{{json .State.Health }}" $(log) | jq
Expand Down
6 changes: 3 additions & 3 deletions build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ services:
dockerfile: Dockerfile
image: "ddmal/rodan-client:nightly"

hpc-rabbitmq:
iipsrv:
build:
context: ./hpc-rabbitmq
context: ./iipsrv
dockerfile: Dockerfile
image: "ddmal/hpc-rabbitmq:nightly"
image: "ddmal/iipsrv:nightly"
13 changes: 10 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ services:
- rodan-main
environment:
TZ: America/Toronto
SERVER_HOST: rodan.dev.simssa.ca
TLS: 0
SERVER_HOST: localhost
ports:
- "80:80"
- "443:443"
Expand All @@ -34,6 +33,8 @@ services:
start_period: "2m"
command: bash -c "tail -f /dev/null"
environment:
TZ: America/Toronto
SERVER_HOST: localhost
CELERY_JOB_QUEUE: None
depends_on:
- postgres
Expand All @@ -48,9 +49,9 @@ services:

rodan-client:
image: "ddmal/rodan-client:${DOCKER_TAG}"
command: bash -c "tail -f /dev/null"
volumes:
- "./rodan-client/code:/code"
- "./rodan-client/config/configuration.json:/client/configuration.json"

iipsrv:
image: "ddmal/iipsrv:${DOCKER_TAG}"
Expand All @@ -61,6 +62,8 @@ services:
image: "ddmal/rodan-main:${DOCKER_TAG}"
command: bash -c "tail -f /dev/null"
environment:
TZ: America/Toronto
SERVER_HOST: localhost
CELERY_JOB_QUEUE: celery
healthcheck:
test:
Expand Down Expand Up @@ -95,6 +98,8 @@ services:
image: "ddmal/rodan-python3-celery:${DOCKER_TAG}"
command: bash -c "tail -f /dev/null"
environment:
TZ: America/Toronto
SERVER_HOST: localhost
CELERY_JOB_QUEUE: Python3
depends_on:
- postgres
Expand All @@ -112,6 +117,8 @@ services:
image: "ddmal/rodan-gpu-celery:${DOCKER_TAG}"
command: bash -c "tail -f /dev/null"
environment:
TZ: America/Toronto
SERVER_HOST: localhost
CELERY_JOB_QUEUE: GPU
depends_on:
- postgres
Expand Down
3 changes: 2 additions & 1 deletion nginx/scripts/start
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ set -o nounset # Treat unset variables as an error when substituting.
set -o xtrace # Print commands and their arguments as they are executed.

/run/setup
sed -i "s/SERVER_HOST/${SERVER_HOST}/g" /etc/nginx/conf.d/ssl.conf

nginx
tail -f /var/log/nginx/access.log & tail -f /var/log/nginx/error.log
#tail -f /var/log/nginx/access.log & tail -f /var/log/nginx/error.log
2 changes: 1 addition & 1 deletion rodan-client/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ RUN apk add bash
WORKDIR code

# Install Yarn packages.
COPY code/package.json code/yarn.lock .
COPY code/package.json code/yarn.lock ./
RUN yarn install --inline-builds && yarn cache clean

# Install node project.
Expand Down
2 changes: 1 addition & 1 deletion rodan-client/config/configuration.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"SERVER_HOST": "rodan.dev.simssa.ca",
"SERVER_HOST": "localhost",
"SERVER_PORT": "443",
"SERVER_HTTPS": true,
"SERVER_SOCKET_AVAILABLE": false,
Expand Down
1 change: 0 additions & 1 deletion rodan-client/local-dev/arm-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ services:
- celery
env_file:
- ./scripts/local.env
- ./hpc-rabbitmq/scripts/local.env
volumes:
- "resources:/rodan/data"
- "./rodan-main/code:/code/Rodan"
Expand Down
4 changes: 2 additions & 2 deletions scripts/staging.env
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ DJANGO_ADMIN_URL=^api/random_secret_admin/
IIPSRV_URL=http://rodan-staging.simssa.ca/fcgi-bin/iipsrv.fcgi/
DJANGO_ACCESS_LOG=/code/Rodan/rodan.log
DJANGO_DEBUG_LOG=/code/Rodan/database.log

SERVER_HOST=rodan-staging.simssa.ca
###############################################################################
# Celery Configuration
###############################################################################
Expand Down Expand Up @@ -47,4 +47,4 @@ RABBITMQ_DEFAULT_PASS=123456Seven

REDIS_HOST=redis
REDIS_PORT=6379
REDIS_DB=0
REDIS_DB=0
19 changes: 12 additions & 7 deletions staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ services:
command: /run/start
environment:
TZ: America/Toronto
SERVER_HOST: rodan-staging.simssa.ca
TLS: 0
SERVER_HOST: rodan.staging.simssa.ca
env_file:
- ./scripts/staging.env
ports:
- "80:80"
- "443:443"
- "5671:5671"
- "9002:9002"
volumes:
Expand Down Expand Up @@ -62,12 +62,17 @@ services:
command: /run/start
environment:
TZ: America/Toronto
SERVER_HOST: rodan-staging.simssa.ca
SERVER_HOST: rodan.staging.simssa.ca
CELERY_JOB_QUEUE: None
env_file:
- ./scripts/staging.env
volumes:
- "resources:/rodan/data"

rodan-client:
image: "ddmal/rodan-client:nightly"
volumes:
- "./rodan-client/config/configuration.json:/client/configuration.json"

iipsrv:
image: "ddmal/iipsrv:nightly"
Expand Down Expand Up @@ -102,7 +107,7 @@ services:
command: /run/start-celery
environment:
TZ: America/Toronto
SERVER_HOST: rodan-staging.simssa.ca
SERVER_HOST: rodan.staging.simssa.ca
CELERY_JOB_QUEUE: celery
env_file:
- ./scripts/staging.env
Expand Down Expand Up @@ -132,7 +137,7 @@ services:
command: /run/start-celery
environment:
TZ: America/Toronto
SERVER_HOST: rodan-staging.simssa.ca
SERVER_HOST: rodan.staging.simssa.ca
CELERY_JOB_QUEUE: Python3
env_file:
- ./scripts/staging.env
Expand Down Expand Up @@ -162,7 +167,7 @@ services:
command: /run/start-celery
environment:
TZ: America/Toronto
SERVER_HOST: rodan-staging.simssa.ca
SERVER_HOST: rodan.staging.simssa.ca
CELERY_JOB_QUEUE: GPU
depends_on:
- postgres
Expand Down
13 changes: 0 additions & 13 deletions test-prod-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ services:
- celery
env_file:
- ./scripts/local.env
- ./hpc-rabbitmq/scripts/local.env
volumes:
- "resources:/rodan/data"
- "./rodan-main/code:/code/Rodan"
Expand Down Expand Up @@ -132,17 +131,5 @@ services:
env_file:
- ./scripts/local.env

hpc-rabbitmq:
image: "ddmal/hpc-rabbitmq:v2.0.0"
healthcheck:
test: ["CMD", "rabbitmq-diagnostics", "-q", "ping"]
interval: "30s"
timeout: "3s"
retries: 3
env_file:
- ./hpc-rabbitmq/scripts/local.env
ports:
- "5672:5672"

volumes:
resources:

0 comments on commit c00420f

Please sign in to comment.