Skip to content
Snippets Groups Projects
Commit 88f60d96 authored by Burhan Akbar's avatar Burhan Akbar
Browse files

setup db with docker

parent 6e91bce1
No related branches found
No related tags found
No related merge requests found
......@@ -4,13 +4,12 @@ services:
mariadb:
image: mariadb:10.11.11
container_name: mariadb
# Host networking means this container listens on the host’s 3306
network_mode: "host"
environment:
MYSQL_ROOT_PASSWORD: comsc
MYSQL_DATABASE: healthcare
volumes:
- "./src/main/resources:/docker-entrypoint-initdb.d"
- ./src/main/resources/schema.sql:/docker-entrypoint-initdb.d/schema.sql
deploy:
resources:
limits:
......@@ -22,7 +21,6 @@ services:
context: .
dockerfile: Dockerfile
container_name: healthcare_01
# Shares the host network, so no port mapping is needed
network_mode: "host"
environment:
- DB_URL=jdbc:mariadb://localhost:3306/healthcare?createDatabaseIfNotExist=true
......
......@@ -14,8 +14,8 @@
Date: 09/12/2024 17:20:20
*/
CREATE DATABASE IF NOT EXISTS health_care;
USE health_care;
CREATE DATABASE IF NOT EXISTS healthcare;
USE healthcare;
SET NAMES utf8mb4;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment