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

Fix #4260 Add sidecar container logs and fix environment container lo… #4313

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
85 changes: 85 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,44 @@
version: "3"
services:

fluentd:
image: fluentd
volumes:
- ./fluentd/conf:/fluentd/etc
ports:
- "24224:24224"
- "24224:24224/udp"

db:
image: postgres:10.4
ports:
- "5432:5432"
depends_on:
- fluentd
logging:
driver: "fluentd"
options:
fluentd-address: localhost:24224
fluentd-async-connect: "true"
fluentd-retry-wait: 1s
fluentd-max-retries: 30
tag: "docker.db"

sqs:
image: softwaremill/elasticmq
hostname: sqs
ports:
- 9324:9324
depends_on:
- fluentd
logging:
driver: "fluentd"
options:
fluentd-address: localhost:24224
fluentd-async-connect: "true"
fluentd-retry-wait: 1s
fluentd-max-retries: 30
tag: "docker.sqs"

django:
hostname: django
Expand All @@ -24,8 +53,18 @@ services:
- db
- sqs
- statsd-exporter
- fluentd
volumes:
- .:/code
logging:
driver: "fluentd"
options:
fluentd-address: localhost:24224
fluentd-async-connect: "true"
fluentd-retry-wait: 1s
fluentd-max-retries: 30
tag: "docker.django"


worker:
env_file:
Expand All @@ -35,8 +74,19 @@ services:
dockerfile: docker/dev/worker/Dockerfile
depends_on:
- django
- fluentd
volumes:
- .:/code
logging:
driver: "fluentd"
options:
fluentd-address: localhost:24224
fluentd-async-connect: "true"
fluentd-retry-wait: 1s
fluentd-max-retries: 30
tag: "docker.worker"



worker_py3_8:
env_file:
Expand All @@ -46,8 +96,18 @@ services:
dockerfile: docker/dev/worker_py3.8/Dockerfile
depends_on:
- django
- fluentd
volumes:
- .:/code
logging:
driver: "fluentd"
options:
fluentd-address: localhost:24224
fluentd-async-connect: "true"
fluentd-retry-wait: 1s
fluentd-max-retries: 30
tag: "docker.worker_py3_8"


nodejs:
hostname: nodejs
Expand All @@ -63,6 +123,17 @@ services:
- .:/code
- /code/node_modules
- /code/bower_components
logging:
driver: "fluentd"
options:
fluentd-address: localhost:24224
fluentd-async-connect: "true"
fluentd-retry-wait: 1s
fluentd-max-retries: 30
tag: "docker.nodejs"
depends_on:
- fluentd


statsd-exporter:
hostname: statsd
Expand All @@ -73,3 +144,17 @@ services:
ports:
- '9125:9125'
- '9102:9102'
depends_on:
- fluentd
logging:
driver: "fluentd"
options:
fluentd-address: localhost:24224
fluentd-async-connect: "true"
fluentd-retry-wait: 1s
fluentd-max-retries: 30
tag: "docker.statsd-exporter"




33 changes: 33 additions & 0 deletions fluentd/conf/fluent.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<source>
@type forward
port 24224
bind 0.0.0.0
</source>

<match docker.django>
@type stdout
</match>

<match docker.worker>
@type stdout
</match>

<match docker.worker_py3_8>
@type stdout
</match>

<match docker.nodejs>
@type stdout
</match>

<match docker.db>
@type stdout
</match>

<match docker.sqs>
@type stdout
</match>

<match docker.statsd-exporter>
@type stdout
</match>