Expose containerized databases to host
This way you can connect with your favorite db client
This commit is contained in:
@@ -24,6 +24,8 @@ services:
|
|||||||
|
|
||||||
db:
|
db:
|
||||||
image: mysql:8.0.23
|
image: mysql:8.0.23
|
||||||
|
ports:
|
||||||
|
- "3307:3306"
|
||||||
environment:
|
environment:
|
||||||
MYSQL_RANDOM_ROOT_PASSWORD: "true"
|
MYSQL_RANDOM_ROOT_PASSWORD: "true"
|
||||||
MYSQL_DATABASE: "cosmic"
|
MYSQL_DATABASE: "cosmic"
|
||||||
@@ -35,8 +37,10 @@ services:
|
|||||||
|
|
||||||
pg_db:
|
pg_db:
|
||||||
image: postgres:15.0
|
image: postgres:15.0
|
||||||
|
ports:
|
||||||
|
- "5433:5432"
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_PASSWORD: postgres
|
POSTGRES_PASSWORD: postgres
|
||||||
volumes:
|
volumes:
|
||||||
- ./database/docker-pg-db-data:/var/lib/postgresql/data
|
- ./database/docker-pg-db-data:/var/lib/postgresql/data
|
||||||
- ./database/postgres-scripts:/docker-entrypoint-initdb.d
|
- ./database/postgres-scripts:/docker-entrypoint-initdb.d
|
||||||
|
|||||||
Reference in New Issue
Block a user