Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename service from extraction-service to ta1-service #11

Merged
merged 2 commits into from
Aug 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ RUN pip install --no-cache-dir poetry==1.5.1
RUN poetry config virtualenvs.create false && \
poetry install --no-root --no-cache --extras api

COPY api extraction-service/api
WORKDIR /extraction-service
COPY api ta1-service/api
WORKDIR /ta1-service

EXPOSE 8000
ENV PYTHONPATH=/extraction-service/api
ENV PYTHONPATH=/ta1-service/api
CMD [ "uvicorn", "server:app", "--reload", "--host", "0.0.0.0", "--port", "8000" ]
2 changes: 1 addition & 1 deletion api/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

def build_api(*args) -> FastAPI:
api = FastAPI(
title="Extraction Service",
title="Terarium TA1 Middleware Service",
description="Middleware for managing interactions with various TA1 services.",
docs_url="/",
)
Expand Down
2 changes: 1 addition & 1 deletion api/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

# REDIS CONNECTION AND QUEUE OBJECTS
redis = Redis(
os.environ.get("REDIS_HOST", "redis.ta1-extraction-service"),
os.environ.get("REDIS_HOST", "redis.ta1-service"),
os.environ.get("REDIS_PORT", "6379"),
)

Expand Down
20 changes: 10 additions & 10 deletions docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ function "check_suffix" {
# ----------------------------------------------------------------------------------------------------------------------

group "prod" {
targets = ["extraction-service-api", "extraction-service-worker"]
targets = ["ta1-service-api", "ta1-service-worker"]
}

group "default" {
targets = ["extraction-service-api-base", "extraction-service-worker-base"]
targets = ["ta1-service-api-base", "ta1-service-worker-base"]
}

# ----------------------------------------------------------------------------------------------------------------------
Expand All @@ -41,22 +41,22 @@ target "_platforms" {
platforms = ["linux/amd64", "linux/arm64"]
}

target "extraction-service-api-base" {
target "ta1-service-api-base" {
context = "."
tags = tag("extraction-service-api", "", "")
tags = tag("ta1-service-api", "", "")
dockerfile = "api/Dockerfile"
}

target "extraction-service-worker-base" {
target "ta1-service-worker-base" {
context = "."
tags = tag("extraction-service-worker", "", "")
tags = tag("ta1-service-worker", "", "")
dockerfile = "workers/Dockerfile"
}

target "extraction-service-api" {
inherits = ["_platforms", "extraction-service-api-base"]
target "ta1-service-api" {
inherits = ["_platforms", "ta1-service-api-base"]
}

target "extraction-service-worker" {
inherits = ["_platforms", "extraction-service-worker-base"]
target "ta1-service-worker" {
inherits = ["_platforms", "ta1-service-worker-base"]
}
73 changes: 8 additions & 65 deletions docker-compose.prod.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
version: "3.9"
networks:
ta1-extraction-service:
ta1-service:
driver: bridge
name: ta1-extraction-service
name: ta1-service
services:
api:
container_name: api-ta1-extraction-service
container_name: api-ta1-service
build:
context: ./
dockerfile: api/Dockerfile
Expand All @@ -14,22 +14,22 @@ services:
env_file:
- api.env
networks:
- ta1-extraction-service
- ta1-service
depends_on:
- redis
volumes:
- $PWD/api:/api
extra_hosts:
- "host.docker.internal:host-gateway"
redis:
container_name: redis-ta1-extraction-service
container_name: redis-ta1-service
image: redis
ports:
- "6379:6379"
networks:
- ta1-extraction-service
- ta1-service
rqworker:
container_name: worker-ta1-extraction-service
container_name: worker-ta1-service
build:
context: ./
dockerfile: workers/Dockerfile
Expand All @@ -38,61 +38,4 @@ services:
depends_on:
- redis
networks:
- ta1-extraction-service

volumes:
mg_lib:
mg_log:
mg_etc:

# mit-tr:
# extends:
# file: ./askem-ta1-dockervm/end-to-end-rest/docker-compose.yml
# service: mit-tr
# networks:
# - ta1-extraction-service
# skema-tr:
# extends:
# file: ./askem-ta1-dockervm/end-to-end-rest/docker-compose.yml
# service: skema-tr
# networks:
# - ta1-extraction-service
# integrated-tr:
# extends:
# file: ./askem-ta1-dockervm/end-to-end-rest/docker-compose.yml
# service: integrated-tr
# networks:
# - ta1-extraction-service
# skema-py:
# extends:
# file: ./askem-ta1-dockervm/end-to-end-rest/docker-compose.yml
# service: skema-py
# networks:
# - ta1-extraction-service
# skema-rs:
# extends:
# # Changed to port 8085
# file: ./askem-ta1-dockervm/end-to-end-rest/docker-compose.yml
# service: skema-rs
# networks:
# - ta1-extraction-service
# graphdb:
# extends:
# # Changed to port 7688
# file: ./askem-ta1-dockervm/end-to-end-rest/docker-compose.yml
# service: graphdb
# networks:
# - ta1-extraction-service
# eq2mml:
# extends:
# # Changed to port 8011
# file: ./askem-ta1-dockervm/end-to-end-rest/docker-compose.yml
# service: eq2mml
# networks:
# - ta1-extraction-service
# mathjax:
# extends:
# file: ./askem-ta1-dockervm/end-to-end-rest/docker-compose.yml
# service: mathjax
# networks:
# - ta1-extraction-service
- ta1-service
32 changes: 16 additions & 16 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
version: "3.9"
networks:
ta1-extraction-service:
ta1-service:
driver: bridge
name: ta1-extraction-service
name: ta1-service
data-api:
external: true
services:
extraction-api:
container_name: api-ta1-extraction-service
container_name: api-ta1-service
build:
context: ./
dockerfile: api/Dockerfile
Expand All @@ -16,23 +16,23 @@ services:
env_file:
- api.env
networks:
- ta1-extraction-service
- ta1-service
- data-api
depends_on:
- redis
volumes:
- $PWD/api:/extraction-service/api
- $PWD/api:/service/api
extra_hosts:
- "host.docker.internal:host-gateway"
redis:
container_name: redis-ta1-extraction-service
container_name: redis-ta1-service
image: redis
ports:
- "6379:6379"
networks:
- ta1-extraction-service
- ta1-service
rqworker:
container_name: worker-ta1-extraction-service
container_name: worker-ta1-service
build:
context: ./
dockerfile: workers/Dockerfile
Expand All @@ -41,26 +41,26 @@ services:
depends_on:
- redis
networks:
- ta1-extraction-service
- ta1-service
- data-api
mit-tr:
extends:
file: ./askem-ta1-dockervm/end-to-end-rest/docker-compose.yml
service: mit-tr
networks:
- ta1-extraction-service
- ta1-service
skema-tr:
extends:
file: ./askem-ta1-dockervm/end-to-end-rest/docker-compose.yml
service: skema-tr
networks:
- ta1-extraction-service
- ta1-service
skema-py:
extends:
file: ./askem-ta1-dockervm/end-to-end-rest/docker-compose.yml
service: skema-py
networks:
- ta1-extraction-service
- ta1-service
skema-unified:
extends:
file: ./askem-ta1-dockervm/end-to-end-rest/docker-compose.yml
Expand All @@ -70,25 +70,25 @@ services:
file: ./askem-ta1-dockervm/end-to-end-rest/docker-compose.yml
service: skema-rs
networks:
- ta1-extraction-service
- ta1-service
graphdb:
extends:
file: ./askem-ta1-dockervm/end-to-end-rest/docker-compose.yml
service: graphdb
networks:
- ta1-extraction-service
- ta1-service
eq2mml:
extends:
file: ./askem-ta1-dockervm/end-to-end-rest/docker-compose.yml
service: eq2mml
networks:
- ta1-extraction-service
- ta1-service
mathjax:
extends:
file: ./askem-ta1-dockervm/end-to-end-rest/docker-compose.yml
service: mathjax
networks:
- ta1-extraction-service
- ta1-service

volumes:
mg_lib:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tool.poetry]
name = "extraction-service"
name = "ta1-service"
version = "0.1.0"
description = ""
authors = ["Powell Fendley"]
Expand Down
Loading