From 4c61d4a45c5c0e3639659312e57a9a38bc266b4a Mon Sep 17 00:00:00 2001 From: Mark Powers Date: Sun, 14 Jul 2024 15:32:55 -0500 Subject: Add docker configuration --- docker-compose.yml | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 docker-compose.yml (limited to 'docker-compose.yml') diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..cacc13c --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,41 @@ +version: "3.8" + +services: + kitchen: + build: + context: . + ports: + - "8080:8080" + depends_on: + kitchen_db: + condition: service_healthy + environment: + - DATABASE=kitchen + - DATABASE_USER=kitchen + - DATABASE_PASS=kitchen + - DATABASE_HOST=kitchen_db + - JWT_SECRET=something_secret + kitchen_db: + image: mysql + command: --default-authentication-plugin=mysql_native_password + environment: + - MYSQL_USER=kitchen + - MYSQL_PASSWORD=kitchen + - MYSQL_ROOT_PASSWORD=kitchen + - MYSQL_DATABASE=kitchen + volumes: + - kitchen-db:/var/lib/mysql + healthcheck: + test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"] + timeout: 20s + retries: 10 + games: + image: games + ports: + - "8081:8080" + environment: + - DATABASE=kitchen + - JWT_SECRET=something_secret + +volumes: + kitchen-db: -- cgit v1.2.3