Skip to content

Commit 9172e08

Browse files
committed
Add MySQL
1 parent dff5516 commit 9172e08

File tree

7 files changed

+54
-2
lines changed

7 files changed

+54
-2
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
## Storages
1414

1515
* [Postgres](postgres/README.md)
16+
* [MySQL](mysql/README.md)
1617
* [Elastic](elastic/README.md)
1718
* [Minio](minio/README.md)
1819

mysql/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# MySQL
2+
3+
* [Simple](docker-compose.yml)

mysql/docker-compose.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
services:
2+
mysql:
3+
image: mysql:9.1
4+
container_name: mysql
5+
environment:
6+
MYSQL_ROOT_PASSWORD: mysql
7+
MYSQL_USER: program
8+
MYSQL_PASSWORD: test
9+
MYSQL_DATABASE: services
10+
healthcheck:
11+
test: [ "CMD-SHELL", "mysqladmin ping -h localhost -u $$MYSQL_USER --password=$$MYSQL_PASSWORD" ]
12+
interval: 10s
13+
timeout: 5s
14+
retries: 5
15+
ports:
16+
- "3306:3306"
17+
volumes:
18+
- mysql:/var/lib/mysql
19+
- ./mysql/:/docker-entrypoint-initdb.d/
20+
21+
volumes:
22+
mysql:

mysql/mysql/10-create-schema.sql

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
-- file: 10-create-schema.sql
2+
CREATE SCHEMA staged;

postgres/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
# Postgres
2+
3+
* [Simple](docker-compose.yml)
4+
* [With PGProfile](docker-compose.pgprofile.yml)

postgres/docker-compose.pgprofile.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
services:
2+
postgres:
3+
build: .
4+
image: romanowalex/postgres:15-pg_profile
5+
container_name: postgres
6+
environment:
7+
POSTGRES_USER: postgres
8+
POSTGRES_PASSWORD: "postgres"
9+
POSTGRES_DB: postgres
10+
healthcheck:
11+
test: [ "CMD-SHELL", "pg_isready -U $$POSTGRES_USER" ]
12+
interval: 10s
13+
timeout: 5s
14+
retries: 5
15+
ports:
16+
- "5432:5432"
17+
volumes:
18+
- postgres:/var/lib/postgresql/data
19+
- ./postgres/:/docker-entrypoint-initdb.d/
20+
21+
volumes:
22+
postgres:

postgres/docker-compose.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
services:
22
postgres:
3-
build: .
4-
image: romanowalex/postgres:15-pg_profile
3+
image: postgres:15
54
container_name: postgres
65
environment:
76
POSTGRES_USER: postgres

0 commit comments

Comments
 (0)