Skip to content
This repository was archived by the owner on Mar 10, 2025. It is now read-only.
Open
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
2 changes: 1 addition & 1 deletion docker/containers/exercise/Dockerfile.calendar
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# This product includes software developed at Datadog (https://www.datadoghq.com/)
# Copyright 2022 Datadog, Inc.
FROM python:3
FROM python:3.9

WORKDIR /home

Expand Down
2 changes: 1 addition & 1 deletion docker/containers/exercise/Dockerfile.notes
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# This product includes software developed at Datadog (https://www.datadoghq.com/)
# Copyright 2022 Datadog, Inc.
FROM python:3
FROM python:3.9

WORKDIR /home

Expand Down
10 changes: 8 additions & 2 deletions docker/containers/exercise/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ services:
ports:
- "8080:8080"
depends_on:
- db
db:
condition: service_healthy
environment:
- DB_HOST=test_postgres # References the Postgres container
- CALENDAR_HOST=calendar # References the calendar container
Expand All @@ -34,4 +35,9 @@ services:
environment:
POSTGRES_PASSWORD: password
POSTGRES_DB: testdb
POSTGRES_HOST_AUTH_METHOD: trust
POSTGRES_HOST_AUTH_METHOD: trust
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres"]
interval: 5s
timeout: 5s
retries: 5
2 changes: 1 addition & 1 deletion docker/containers/solution/Dockerfile.calendar
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# This product includes software developed at Datadog (https://www.datadoghq.com/)
# Copyright 2022 Datadog, Inc.
FROM python:3
FROM python:3.9

ENV DD_SERVICE="calendar"
ENV DD_ENV="dev"
Expand Down
2 changes: 1 addition & 1 deletion docker/containers/solution/Dockerfile.notes
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# This product includes software developed at Datadog (https://www.datadoghq.com/)
# Copyright 2022 Datadog, Inc.
FROM python:3
FROM python:3.9

ENV DD_SERVICE="notes"
ENV DD_ENV="dev"
Expand Down
8 changes: 7 additions & 1 deletion docker/containers/solution/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ services:
- /var/run/docker.sock:/var/run/docker.sock:ro
- /proc/:/host/proc/:ro
- /sys/fs/cgroup/:/host/sys/fs/cgroup:ro
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres"]
interval: 5s
timeout: 5s
retries: 5

calendar_app:
container_name: calendar
Expand All @@ -37,7 +42,8 @@ services:
ports:
- "8080:8080"
depends_on:
- db
db:
condition: service_healthy
environment:
- DB_HOST=test_postgres # References the Postgres container
- CALENDAR_HOST=calendar # References the calendar container
Expand Down
2 changes: 1 addition & 1 deletion docker/host-and-containers/exercise/Dockerfile.calendar
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# This product includes software developed at Datadog (https://www.datadoghq.com/)
# Copyright 2022 Datadog, Inc.
FROM python:3
FROM python:3.9

WORKDIR /home

Expand Down
2 changes: 1 addition & 1 deletion docker/host-and-containers/exercise/Dockerfile.notes
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# This product includes software developed at Datadog (https://www.datadoghq.com/)
# Copyright 2022 Datadog, Inc.
FROM python:3
FROM python:3.9

WORKDIR /home

Expand Down
9 changes: 8 additions & 1 deletion docker/host-and-containers/exercise/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ services:
POSTGRES_PASSWORD: password
POSTGRES_DB: testdb
POSTGRES_HOST_AUTH_METHOD: trust
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres"]
interval: 5s
timeout: 5s
retries: 5

notes_app:
container_name: notes
restart: always
Expand All @@ -21,7 +27,8 @@ services:
ports:
- "8080:8080"
depends_on:
- db
db:
condition: service_healthy
environment:
- DB_HOST=test_postgres # References the Postgres container
- CALENDAR_HOST=calendar # References the calendar container
Expand Down
2 changes: 1 addition & 1 deletion docker/host-and-containers/solution/Dockerfile.calendar
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# This product includes software developed at Datadog (https://www.datadoghq.com/)
# Copyright 2022 Datadog, Inc.
FROM python:3
FROM python:3.9

ENV DD_SERVICE="calendar"
ENV DD_ENV="dev"
Expand Down
2 changes: 1 addition & 1 deletion docker/host-and-containers/solution/Dockerfile.notes
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# This product includes software developed at Datadog (https://www.datadoghq.com/)
# Copyright 2022 Datadog, Inc.
FROM python:3
FROM python:3.9

ENV DD_SERVICE="notes"
ENV DD_ENV="dev"
Expand Down
9 changes: 8 additions & 1 deletion docker/host-and-containers/solution/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ services:
POSTGRES_PASSWORD: password
POSTGRES_DB: testdb
POSTGRES_HOST_AUTH_METHOD: trust
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres"]
interval: 5s
timeout: 5s
retries: 5

notes_app:
container_name: notes
restart: always
Expand All @@ -21,7 +27,8 @@ services:
ports:
- "8080:8080"
depends_on:
- db
db:
condition: service_healthy
# extra_hosts: # Linux only configuration
# - "host.docker.internal:host-gateway" # Linux only configuration
environment:
Expand Down
504 changes: 240 additions & 264 deletions poetry.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Flask = "2.2.2"
requests = "^2.28.1"
ddtrace = "1.3.4"
psycopg2-binary = "^2.9.5"
werkzeug = ">=2.2,<3.0"

[tool.poetry.dev-dependencies]

Expand Down
28 changes: 24 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
flask==2.2.2
psycopg2-binary==2.9.6
requests==2.28.1
ddtrace
attrs==22.1.0 ; python_version >= "3.9" and python_version < "4.0"
bytecode==0.13.0 ; python_version >= "3.9" and python_version < "4.0"
certifi==2022.6.15 ; python_version >= "3.9" and python_version < "4"
charset-normalizer==2.1.1 ; python_version >= "3.9" and python_version < "4"
click==8.1.3 ; python_version >= "3.9" and python_version < "4.0"
colorama==0.4.5 ; python_version >= "3.9" and python_version < "4.0" and platform_system == "Windows"
ddsketch==2.0.4 ; python_version >= "3.9" and python_version < "4.0"
ddtrace==1.3.4 ; python_version >= "3.9" and python_version < "4.0"
flask==2.2.2 ; python_version >= "3.9" and python_version < "4.0"
idna==3.3 ; python_version >= "3.9" and python_version < "4"
importlib-metadata==4.12.0 ; python_version >= "3.9" and python_version < "3.10"
itsdangerous==2.1.2 ; python_version >= "3.9" and python_version < "4.0"
jinja2==3.1.2 ; python_version >= "3.9" and python_version < "4.0"
markupsafe==2.1.1 ; python_version >= "3.9" and python_version < "4.0"
packaging==21.3 ; python_version >= "3.9" and python_version < "4.0"
protobuf==4.21.5 ; python_version >= "3.9" and python_version < "4.0"
psycopg2-binary==2.9.5 ; python_version >= "3.9" and python_version < "4.0"
pyparsing==3.0.9 ; python_version >= "3.9" and python_version < "4.0"
requests==2.28.1 ; python_version >= "3.9" and python_version < "4"
six==1.16.0 ; python_version >= "3.9" and python_version < "4.0"
tenacity==8.0.1 ; python_version >= "3.9" and python_version < "4.0"
urllib3==1.26.12 ; python_version >= "3.9" and python_version < "4"
werkzeug==2.3.8 ; python_version >= "3.9" and python_version < "4.0"
zipp==3.8.1 ; python_version >= "3.9" and python_version < "3.10"