-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added container definitions and test environment
- Loading branch information
1 parent
68ad927
commit 48858e0
Showing
5 changed files
with
176 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
version: "3.8" | ||
|
||
networks: | ||
omotes: | ||
|
||
|
||
volumes: | ||
db-data: | ||
broker-data: | ||
influxdb_storage: | ||
|
||
|
||
services: | ||
rabbitmq: | ||
image: bitnami/rabbitmq:3.8.27 | ||
ports: | ||
- "15672:15672" | ||
- "5673:5672" | ||
networks: | ||
- omotes | ||
healthcheck: | ||
test: [ "CMD", "curl", "-f", "http://localhost:15672" ] | ||
interval: 10s | ||
timeout: 10s | ||
retries: 5 | ||
|
||
omotes_influxdb: | ||
image: influxdb:1.7 | ||
ports: | ||
- "${INFLUXDB_PORT}:${INFLUXDB_PORT}" | ||
- "${INFLUXDB_RPC_PORT}:${INFLUXDB_RPC_PORT}" | ||
networks: | ||
- omotes | ||
environment: | ||
- INFLUXDB_ADMIN_USER=${INFLUXDB_ADMIN_USER} | ||
- INFLUXDB_ADMIN_PASSWORD=${INFLUXDB_ADMIN_PASSWORD} | ||
- INFLUXDB_HTTP_BIND_ADDRESS=:${INFLUXDB_PORT} | ||
- INFLUXDB_BIND_ADDRESS=:${INFLUXDB_RPC_PORT} | ||
- INFLUXDB_DB=omotes_timeseries | ||
- INFLUXDB_WRITE_USER=${INFLUXDB_WRITE_USER} | ||
- INFLUXDB_WRITE_USER_PASSWORD=${INFLUXDB_WRITE_USER_PASSWORD} | ||
healthcheck: | ||
test: | ||
[ | ||
"CMD", | ||
"curl", | ||
"-f", | ||
"http://omotes_influxdb:${INFLUXDB_PORT}/ping" | ||
] | ||
interval: 10s | ||
timeout: 5s | ||
volumes: | ||
- influxdb_storage:/var/lib/influxdb | ||
|
||
simulator_worker: | ||
build: | ||
context: . | ||
env_file: .env | ||
networks: | ||
- omotes | ||
deploy: | ||
replicas: 1 | ||
depends_on: | ||
rabbitmq: | ||
condition: service_healthy | ||
omotes_influxdb: | ||
condition: service_healthy | ||
|
||
local_test: | ||
build: | ||
context: ./local_test | ||
dockerfile: Dockerfile | ||
networks: | ||
- omotes | ||
depends_on: | ||
simulator_worker: | ||
condition: service_started |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FROM python:3.11-bookworm | ||
|
||
WORKDIR /app | ||
|
||
COPY ./requirements.txt . | ||
|
||
RUN pip install -r requirements.txt | ||
|
||
COPY . . | ||
|
||
ENTRYPOINT python -u test_app.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
celery==5.3.5 | ||
jsonpickle==3.0.2 |
Large diffs are not rendered by default.
Oops, something went wrong.