Skip to content

Commit

Permalink
Fix up credentials and make rabbitmq optional
Browse files Browse the repository at this point in the history
  • Loading branch information
fivegrant committed Aug 15, 2023
1 parent 26ff02a commit fc19cf0
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,22 @@ endif
# Turn project on
.PHONY:up
up:docker/docker-compose.yaml
$(DOCKER_COMPOSE) compose --file $(DOCKER_COMPOSE_YAML) up -d
$(DOCKER_COMPOSE) compose --profile standalone --file $(DOCKER_COMPOSE_YAML) up -d

# Rebuild all containers and turn project on
.PHONY:up-rebuild
up-rebuild:$(DOCKER_COMPOSE_YAML)
$(DOCKER_COMPOSE) compose --file $(DOCKER_COMPOSE_YAML) up --build -d
$(DOCKER_COMPOSE) compose --profile standalone --file $(DOCKER_COMPOSE_YAML) up --build -d

# Rebuild the docker image from scratch
.PHONY:up-rebuild
.PHONY:force-rebuild
force-rebuild:$(DOCKER_COMPOSE_YAML)
$(DOCKER_COMPOSE) compose --file $(DOCKER_COMPOSE_YAML) build --no-cache

# Turn project off
.PHONY:down
down:$(DOCKER_COMPOSE_YAML)
$(DOCKER_COMPOSE) compose --file $(DOCKER_COMPOSE_YAML) down
$(DOCKER_COMPOSE) compose --profile standalone --file $(DOCKER_COMPOSE_YAML) down

# Restart project
.PHONY:restart
Expand Down
4 changes: 3 additions & 1 deletion docker/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ services:
depends_on:
- redis
- api
- rabbitmq
networks:
- data-api
- pyciemss
rabbitmq:
container_name: rabbitmq
profiles: ["standalone"]
hostname: rabbitmq
image: 'rabbitmq:3'
healthcheck:
Expand All @@ -57,10 +57,12 @@ services:
retries: 5
ports:
- "5672:5672"
- "15672:15672"
networks:
- pyciemss
rabbitmq-mock-consumer:
container_name: rabbitmq-mock-consumer
profiles: ["standalone"]
build:
context: ..
dockerfile: docker/Dockerfile.api
Expand Down
2 changes: 2 additions & 0 deletions env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ REDIS_HOST=redis
REDIS_PORT=6379
RABBITMQ_HOST=rabbitmq.pyciemss
RABBITMQ_PORT=5672
RABBITMQ_USERNAME=guest
RABBITMQ_PASSWORD=guest
4 changes: 2 additions & 2 deletions service/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ class Settings(BaseSettings):
REDIS_PORT: int = 6379
RABBITMQ_HOST: str = "rabbitmq.pyciemss"
RABBITMQ_PORT: int = 5672
RABBITMQ_USERNAME: str = "terarium"
RABBITMQ_PASSWORD: str = "terarium123"
RABBITMQ_USERNAME: str = "guest"
RABBITMQ_PASSWORD: str = "guest"


settings = Settings()

0 comments on commit fc19cf0

Please sign in to comment.