mirror of
https://git.roussel.pro/telecom-paris/pact.git
synced 2026-02-09 02:20:17 +01:00
49 lines
1.1 KiB
YAML
49 lines
1.1 KiB
YAML
version: "3.9"
|
|
services:
|
|
db:
|
|
image: mysql:latest
|
|
container_name: db
|
|
expose:
|
|
- 3306
|
|
volumes:
|
|
- ./db:/docker-entrypoint-initdb.d
|
|
restart: always
|
|
healthcheck:
|
|
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost", "-uroot"] # Command to check health.
|
|
interval: 5s # Interval between health checks.
|
|
timeout: 5s # Timeout for each health checking.
|
|
retries: 20 # Hou many times retries.
|
|
start_period: 10s # Estimated time to boot.
|
|
environment:
|
|
MYSQL_ROOT_PASSWORD: telereview
|
|
MYSQL_DATABASE: telereview
|
|
|
|
phpmyadmin:
|
|
image: phpmyadmin:latest
|
|
restart: always
|
|
container_name: phpmyadmin
|
|
depends_on:
|
|
- db
|
|
environment:
|
|
PMA_ARBITRARY: 1
|
|
PMA_HOST: db
|
|
PMA_USER: root
|
|
PMA_PASSWORD: telereview
|
|
ports:
|
|
- 8000:80
|
|
|
|
reviews_api:
|
|
container_name: reviews_api
|
|
ports:
|
|
- 8080:8080
|
|
environment:
|
|
- NODE_ENV=production
|
|
- DB_USER=root
|
|
- DB_PASSWORD=telereview
|
|
- DB_HOST=db
|
|
- DB_NAME=telereview
|
|
- PORT=8080
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
build: ./reviews_api |