django, postgresql consists of docker-compose, and sentry consists each as a container while looking at the official document. Then, I created a new network (my_network) and connected django and sentry. However, issue tracking does not work.
ps) It worked when django was turned locally instead of as a container.
version: '3.8'
volumes:
postgres:
driver: local
redis:
driver: local
services:
postgresql:
image: postgres
# build: ./.docker/postgresql
volumes:
- postgres:/var/lib/postgresql/data/
environment:
POSTGRES_DB: aio_setting
POSTGRES_USER: root
POSTGRES_PASSWORD: aio0706!
restart: unless-stopped
ports:
- '5432:5432'
redis:
# image: redis/redis-stack-server:latest
image: "redis:alpine"
restart: unless-stopped
ports:
- '6379:6379'
volumes:
- redis:/data
app:
build: .
container_name: app
command: /entrypoint.sh
volumes:
- .:/usr/src/app
restart: unless-stopped
ports:
- "8000:8000"
depends_on:
- postgresql
- redis
import sentry_sdk
from sentry_sdk.integrations.django import DjangoIntegration
sentry_sdk.init(
dsn="http://e09d532f1c594fcebfa2bc51bcb7cfe6@my-sentry:8080/2",
# dsn="http://e09d532f1c594fcebfa2bc51bcb7cfe6@localhost:8080/2", # this worked when undockerizing
integrations=[DjangoIntegration()]
)
???? docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES test_container
cf5917ebf752 hubsettings-app "/entrypoint.sh" 2 hours ago Up 30 minutes 0.0.0.0:8000->8000/tcp app
d096160bfd5d sentry "/entrypoint.sh run …" 2 hours ago Up 2 hours 0.0.0.0:8080->9000/tcp my-sentry
36aa3792c5b5 sentry "/entrypoint.sh run …" 2 hours ago Up 2 hours 9000/tcp sentry-worker-1
61906d23cab7 sentry "/entrypoint.sh run …" 2 hours ago Up 2 hours 9000/tcp sentry-cron
29d6b99e67c2 postgres "docker-entrypoint.s…" 3 hours ago Up 3 hours 5432/tcp sentry-postgres
55cfebcf94f7 redis "docker-entrypoint.s…" 3 hours ago Up 3 hours 6379/tcp sentry-redis
85097bee3240 redis:alpine "docker-entrypoint.s…" 28 hours ago Up 30 minutes 0.0.0.0:6379->6379/tcp hubsettings-redis-1
94147514ed6d postgres "docker-entrypoint.s…" 2 weeks ago Up 30 minutes 0.0.0.0:5432->5432/tcp hubsettings-postgresql-1
???? docker network ls
NETWORK ID NAME DRIVER SCOPE
5f24e669cea7 bridge bridge local
168f0b807556 host host local
c401fdcf2e32 hubsettings_default bridge local
d5a7c1e7e6c6 my_network bridge local
83c8f2597477 none null local
Do I need to specify a specific network
import sentry_sdk
from sentry_sdk.integrations.django import DjangoIntegration
sentry_sdk.init(
dsn="http://e09d532f1c594fcebfa2bc51bcb7cfe6@my_network:my-sentry:8080/2",
integrations=[DjangoIntegration()]
)
I want it to be an issue tracking