Skip to content

Commit bc0399e

Browse files
committed
update
1 parent a62e942 commit bc0399e

File tree

5 files changed

+533
-93
lines changed

5 files changed

+533
-93
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ lerna-debug.log*
3535
!.vscode/extensions.json
3636

3737
# Docker
38-
/docker
38+
/docker

README.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
# NestJS Docker Starter Kit
44
- NestJS v10.x
55
- TypeScript v5.x
6+
- MariaDB v10.11.x (default)
7+
- MySQL v8.1.x
68
- Postgres v16.x
79
- pgAdmin v4.x
810
- Adminer v4.8.x
@@ -22,8 +24,22 @@
2224
### App
2325
- URL: http://localhost:3000
2426

25-
### Adminer
27+
### phpMyAdmin
2628
- URL: http://localhost:8080
29+
- Server: `db`
30+
- Username: `refactorian`
31+
- Password: `refactorian`
32+
- Database: `refactorian`
33+
34+
### Adminer
35+
- URL: http://localhost:9090
36+
- Server: `db`
37+
- Username: `refactorian`
38+
- Password: `refactorian`
39+
- Database: `refactorian`
40+
41+
<!-- ### Adminer
42+
- URL: http://localhost:9090
2743
- System: `PostgreSQL`
2844
- Server: `db`
2945
- Username: `refactorian`
@@ -33,7 +49,7 @@
3349
### pgAdmin
3450
- URL: http://localhost:5050
3551
- Email: `admin@admin.com`
36-
- Password: `password`
52+
- Password: `password` -->
3753

3854
### Docker compose commands
3955
- Build or rebuild services

docker-compose.yml

Lines changed: 43 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,30 +12,58 @@ services:
1212
- db
1313

1414
db:
15-
image: postgres:16
15+
image: mariadb:10.11
16+
#image: mysql:8.1
17+
command: '--default-authentication-plugin=mysql_native_password'
1618
environment:
17-
- POSTGRES_USER=refactorian
18-
- POSTGRES_PASSWORD=refactorian
19-
- POSTGRES_DB=refactorian
19+
- MYSQL_ROOT_PASSWORD=rootpass
20+
- MYSQL_DATABASE=refactorian
21+
- MYSQL_USER=refactorian
22+
- MYSQL_PASSWORD=refactorian
2023
volumes:
21-
- ./docker/db/data:/var/lib/postgresql/data
24+
- ./docker/db/data:/var/lib/mysql
2225
- ./docker/db/sql:/docker-entrypoint-initdb.d
2326
ports:
24-
- 5432:5432
27+
- 3306:3306
2528

26-
pgadmin:
27-
image: dpage/pgadmin4
28-
environment:
29-
- PGADMIN_DEFAULT_EMAIL=admin@admin.com
30-
- PGADMIN_DEFAULT_PASSWORD=password
29+
phpmyadmin:
30+
image: phpmyadmin/phpmyadmin
3131
ports:
32-
- 5050:80
33-
depends_on:
34-
- db
32+
- 8080:80
33+
links:
34+
- db
35+
environment:
36+
PMA_HOST: db
37+
PMA_PORT: 3306
38+
PMA_ARBITRARY: 1
39+
volumes:
40+
- ./docker/phpmyadmin/sessions:/sessions
41+
42+
# db:
43+
# image: postgres:16
44+
# environment:
45+
# - POSTGRES_USER=refactorian
46+
# - POSTGRES_PASSWORD=refactorian
47+
# - POSTGRES_DB=refactorian
48+
# volumes:
49+
# - ./docker/db/data:/var/lib/postgresql/data
50+
# - ./docker/db/sql:/docker-entrypoint-initdb.d
51+
# ports:
52+
# - 5432:5432
53+
54+
# pgadmin:
55+
# image: dpage/pgadmin4
56+
# environment:
57+
# - PGADMIN_DEFAULT_EMAIL=admin@admin.com
58+
# - PGADMIN_DEFAULT_PASSWORD=password
59+
# ports:
60+
# - 5050:80
61+
# depends_on:
62+
# - db
3563

3664
adminer:
3765
image: adminer
3866
ports:
39-
- 8080:8080
67+
- 9090:8080
4068
depends_on:
4169
- db

0 commit comments

Comments
 (0)