You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

154 lines
3.4 KiB

# Comments are provided throughout this file to help you get started.
# If you need more help, visit the Docker Compose reference guide at
# https://docs.docker.com/go/compose-spec-reference/
# Here the instructions define your application as a service called "server".
# This service is built from the Dockerfile in the current directory.
# You can add other services your application may depend on here, such as a
# database or a cache. For examples, see the Awesome Compose repository:
# https://github.com/docker/awesome-compose
services:
restaurant_restful:
build:
context: .
target: final
command:
- --config=/app/configs/example.yaml
- start
- restaurant-restful
ports:
- 1992:1992
volumes:
- ./configs/example.yaml:/app/configs/example.yaml
depends_on:
- mongodb
payment_restful:
build:
context: .
target: final
command:
- --config=/app/configs/example.yaml
- start
- payment-restful
ports:
- 1997:1997
volumes:
- ./configs/example.yaml:/app/configs/example.yaml
depends_on:
- mongodb
order_restful:
build:
context: .
target: final
command:
- --config=/app/configs/example.yaml
- start
- order-restful
ports:
- 1993:1993
volumes:
- ./configs/example.yaml:/app/configs/example.yaml
depends_on:
mariadb:
condition: service_healthy
user_restful:
build:
context: .
target: final
command:
- --config=/app/configs/example.yaml
- start
- user-restful
ports:
- 1994:1994
volumes:
- ./configs/example.yaml:/app/configs/example.yaml
depends_on:
- mongodb
- mariadb
logistics_restful:
build:
context: .
target: final
command:
- --config=/app/configs/example.yaml
- start
- logistics-restful
ports:
- 1995:1995
volumes:
- ./configs/example.yaml:/app/configs/example.yaml
depends_on:
- mongodb
- mariadb
notify_restful:
build:
context: .
target: final
command:
- --config=/app/configs/example.yaml
- start
- notify-restful
ports:
- 1996:1996
volumes:
- ./configs/example.yaml:/app/configs/example.yaml
depends_on:
- mongodb
- mariadb
mongodb:
image: mongo
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: admin
MONGO_INITDB_ROOT_PASSWORD: changeme
volumes:
- mongo-data:/data/db
mariadb:
image: mariadb:latest
restart: always
environment:
MYSQL_ROOT_PASSWORD: changeme
MYSQL_DATABASE: godine
volumes:
- mariadb-data:/var/lib/mysql
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
start_period: 10s
interval: 10s
timeout: 5s
retries: 3
redis:
image: redis:7
restart: always
otel-collector:
image: otel/opentelemetry-collector-contrib:latest
command: [ "--config=/etc/otel-collector-config.yaml" ]
volumes:
- ./configs/otel-collector-config.yaml:/etc/otel-collector-config.yaml
jaeger:
image: jaegertracing/all-in-one:latest
ports:
- 26686:16686
prometheus:
image: prom/prometheus:latest
volumes:
- ./configs/prometheus.yml:/etc/prometheus/prometheus.yml
ports:
- 29090:9090
volumes:
mongo-data:
mariadb-data: