docker env support
This commit is contained in:
parent
7aee25cb33
commit
71d0b0be3c
2 changed files with 12 additions and 25 deletions
|
|
@ -1 +1,8 @@
|
||||||
DATABASE_URL=
|
DB_USER=postgres
|
||||||
|
DB_PASSWORD=
|
||||||
|
DB_NAME=postgres
|
||||||
|
DB_HOST=localhost
|
||||||
|
DB_PORT=5432
|
||||||
|
|
||||||
|
|
||||||
|
DATABASE_URL='postgres://${DB_USER}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME}'
|
||||||
|
|
@ -9,6 +9,7 @@ services:
|
||||||
- NODE_ENV=production
|
- NODE_ENV=production
|
||||||
- OTEL_EXPORTER_OTLP_ENDPOINT=http://tracing:4318
|
- OTEL_EXPORTER_OTLP_ENDPOINT=http://tracing:4318
|
||||||
- OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
|
- OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
|
||||||
|
- DATABASE_URL=postgresql://${DB_USER}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME}
|
||||||
networks:
|
networks:
|
||||||
- api-network
|
- api-network
|
||||||
depends_on:
|
depends_on:
|
||||||
|
|
@ -20,37 +21,16 @@ services:
|
||||||
- COLLECTOR_ZIPKIN_HOST_PORT=:9411
|
- COLLECTOR_ZIPKIN_HOST_PORT=:9411
|
||||||
- COLLECTOR_OTLP_ENABLED=true
|
- COLLECTOR_OTLP_ENABLED=true
|
||||||
ports:
|
ports:
|
||||||
# UI
|
|
||||||
- "16686:16686"
|
- "16686:16686"
|
||||||
# Zipkin compatible endpoint
|
|
||||||
- "9411:9411"
|
|
||||||
# OTLP gRPC
|
|
||||||
- "4317:4317"
|
|
||||||
# OTLP HTTP
|
|
||||||
- "4318:4318"
|
|
||||||
# Jaeger gRPC
|
|
||||||
- "14250:14250"
|
|
||||||
# Jaeger HTTP
|
|
||||||
- "14268:14268"
|
|
||||||
# Admin HTTP
|
|
||||||
- "14269:14269"
|
|
||||||
# Agent configs
|
|
||||||
- "5778:5778"
|
|
||||||
# Thrift compact
|
|
||||||
- "6831:6831/udp"
|
|
||||||
# Thrift binary
|
|
||||||
- "6832:6832/udp"
|
|
||||||
networks:
|
networks:
|
||||||
- api-network
|
- api-network
|
||||||
|
|
||||||
db:
|
db:
|
||||||
image: postgres:latest
|
image: postgres:latest
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_USER: myusername
|
POSTGRES_USER: ${DB_USER}
|
||||||
POSTGRES_PASSWORD: mypassword
|
POSTGRES_PASSWORD: ${DB_PASSWORD}
|
||||||
POSTGRES_DB: mydatabase
|
POSTGRES_DB: ${DB_NAME}
|
||||||
ports:
|
|
||||||
- "5432:5432"
|
|
||||||
volumes:
|
volumes:
|
||||||
- postgres_data:/var/lib/postgresql/data
|
- postgres_data:/var/lib/postgresql/data
|
||||||
networks:
|
networks:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue