From 2b2328b3846b65e1656d2c93428a6cbb77ca4c2d Mon Sep 17 00:00:00 2001 From: mrfzy Date: Sun, 20 Oct 2024 19:09:27 +0700 Subject: [PATCH] feat: added docker compose with modified apps --- docker-compose.yml | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 7d41b57d2..61417ed08 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,25 +1,27 @@ services: - mysql: - image: mysql:9.0 + app: + build: + context: . + dockerfile: Dockerfile ports: - - "3306:3306" + - 8000:8000 + - 8080:80 environment: - - MYSQL_ROOT_PASSWORD= - - MYSQL_ALLOW_EMPTY_PASSWORD=true - - MYSQL_USER=petclinic - - MYSQL_PASSWORD=petclinic - - MYSQL_DATABASE=petclinic + - SERVER_PORT=8080 + - DATABASE_URL=jdbc:postgresql://postgresdb/petclinic volumes: - - "./conf.d:/etc/mysql/conf.d:ro" - profiles: - - mysql - postgres: - image: postgres:17.0 + - ./:/app + depends_on: + - postgresdb + postgresdb: + image: postgres:14 ports: - - "5432:5432" + - 5432:5432 environment: - - POSTGRES_PASSWORD=petclinic - POSTGRES_USER=petclinic + - POSTGRES_PASSWORD=petclinic - POSTGRES_DB=petclinic - profiles: - - postgres + volumes: + - postgres_data:/var/lib/postgresql/data +volumes: + postgres_data: \ No newline at end of file