Skip to content

Commit 3b62954

Browse files
chore: add databases with docker
1 parent 9a40804 commit 3b62954

File tree

4 files changed

+47
-74
lines changed

4 files changed

+47
-74
lines changed

packages/_examples/demo/Dockerfile

-72
This file was deleted.

packages/_examples/demo/README.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ Make sure that:
77

88
## Installation
99

10+
# 1. Construire les conteneurs
11+
docker compose build
12+
13+
# 2. Démarrer les services
14+
docker compose up -d
15+
16+
1017
Install the requirements
1118

1219
```
@@ -36,4 +43,3 @@ Run the app
3643
```
3744
rails server
3845
```
39-

packages/_examples/demo/config/mongoid.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ development:
1313
# Provides the hosts the default client can connect to. Must be an array
1414
# of host:port pairs. (required)
1515
hosts:
16-
- localhost:27017
16+
- localhost:27018
1717
options:
1818
# Note that all options listed below are Ruby driver client options (the mongo gem).
1919
# Please refer to the driver documentation of the version of the mongo gem you are using
+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
services:
2+
postgres:
3+
image: postgres:15
4+
container_name: postgres_db
5+
restart: always
6+
environment:
7+
POSTGRES_USER: ${DB_USERNAME}
8+
POSTGRES_PASSWORD: ${DB_PASSWORD}
9+
POSTGRES_DB: ${DB_DATABASE}
10+
ports:
11+
- "5434:${DB_PORT}"
12+
volumes:
13+
- postgres_data:/var/lib/postgresql/data
14+
15+
mysql:
16+
image: mysql:8
17+
container_name: mysql_db
18+
restart: always
19+
environment:
20+
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD_MYSQL}
21+
MYSQL_DATABASE: ${DB_DATABASE_MYSQL}
22+
ports:
23+
- "3308:${DB_PORT_MYSQL}"
24+
volumes:
25+
- mysql_data:/var/lib/mysql
26+
27+
mongo:
28+
image: mongo:6
29+
container_name: mongo_db
30+
restart: always
31+
ports:
32+
- "27018:27017"
33+
volumes:
34+
- mongo_data:/data/db
35+
36+
volumes:
37+
postgres_data:
38+
mysql_data:
39+
mongo_data:

0 commit comments

Comments
 (0)