feat: added docker compose with modified apps

This commit is contained in:
mrfzy 2024-10-20 19:09:27 +07:00
parent 22a7dd454d
commit 2b2328b384

View file

@ -1,25 +1,27 @@
services: services:
mysql: app:
image: mysql:9.0 build:
context: .
dockerfile: Dockerfile
ports: ports:
- "3306:3306" - 8000:8000
- 8080:80
environment: environment:
- MYSQL_ROOT_PASSWORD= - SERVER_PORT=8080
- MYSQL_ALLOW_EMPTY_PASSWORD=true - DATABASE_URL=jdbc:postgresql://postgresdb/petclinic
- MYSQL_USER=petclinic
- MYSQL_PASSWORD=petclinic
- MYSQL_DATABASE=petclinic
volumes: volumes:
- "./conf.d:/etc/mysql/conf.d:ro" - ./:/app
profiles: depends_on:
- mysql - postgresdb
postgres: postgresdb:
image: postgres:17.0 image: postgres:14
ports: ports:
- "5432:5432" - 5432:5432
environment: environment:
- POSTGRES_PASSWORD=petclinic
- POSTGRES_USER=petclinic - POSTGRES_USER=petclinic
- POSTGRES_PASSWORD=petclinic
- POSTGRES_DB=petclinic - POSTGRES_DB=petclinic
profiles: volumes:
- postgres - postgres_data:/var/lib/postgresql/data
volumes:
postgres_data: