├── .gitignore
├── LICENSE
├── README.md
├── mongodb-docker-compose-examples
├── README.md
├── assets
│ ├── directory-structure.mm
│ ├── docker-compose-file.odg
│ └── mongo-initialization-file.odg
├── mongodb-empty-single
│ ├── .env
│ └── dc-mongodb-empty-single.yml
├── mongodb-single
│ ├── .env
│ ├── dc-mongodb-single.yml
│ └── mongodb
│ │ └── initdb.d
│ │ └── mongo-init.js
└── pics
│ ├── directory-structure.jpg
│ ├── docker-compose-file-original.png
│ ├── docker-compose-file.png
│ ├── mongo-compass-001.png
│ ├── mongo-compass-002.png
│ ├── mongo-compass-003.png
│ ├── mongo-compass.png
│ ├── mongo-express-connection-001.png
│ ├── mongo-express-connection-002.png
│ ├── mongo-initialization-file.png
│ ├── mongosh-from-terminal-001.png
│ ├── simple-docker-compose-4-single-node-mongodb-001.png
│ ├── simple-docker-compose-4-single-node-mongodb-002.png
│ ├── simple-docker-compose-4-single-node-mongodb-003.png
│ ├── simple-docker-compose-4-single-node-mongodb-004.png
│ ├── vs-code-mongodb-extension-001.png
│ ├── vs-code-mongodb-extension-002.png
│ ├── vs-code-mongodb-extension-003.png
│ └── vs-code-mongodb-extension-004.png
├── postgresql-docker-compose-examples
├── README.md
├── assets
│ ├── directory-structure.mm
│ ├── docker-compose-file-postgresql-complete.odg
│ └── docker-compose-file-postgresql-only.odg
├── pics
│ ├── PostgreSQL_logo.3colors.120x120.png
│ ├── PostgreSQL_logo.3colors.540x557.png
│ ├── access_pg_with_dbeaver_001.png
│ ├── access_pg_with_dbeaver_002.png
│ ├── access_pg_with_dbeaver_003-1.png
│ ├── access_pg_with_dbeaver_003.png
│ ├── access_pg_with_dbeaver_004.png
│ ├── access_pg_with_dbeaver_005.png
│ ├── access_pg_with_dbeaver_006.png
│ ├── access_pg_with_dbeaver_007.png
│ ├── accessing_pg_instance_from_cli_in_container.png
│ ├── accessing_pg_with_metabase_001.png
│ ├── accessing_pg_with_metabase_002.png
│ ├── accessing_pg_with_metabase_003.png
│ ├── accessing_pg_with_metabase_004.png
│ ├── accessing_pg_with_metabase_005.png
│ ├── accessing_pg_with_metabase_006.png
│ ├── accessing_pg_with_metabase_007.png
│ ├── accessing_pg_with_metabase_008.png
│ ├── accessing_pg_with_metabase_009.png
│ ├── dc-postgresql-complet-yml.png
│ ├── dc-postgresql-single-yml.alternative.png
│ ├── dc-postgresql-single-yml.png
│ ├── directory-structure.png
│ ├── docker-compose-file-postgresql-complete.png
│ ├── docker-compose-file-postgresql-only.jpg
│ ├── docker-compose-file-postgresql-only.png
│ ├── docker-compose-result-for-first-time-pull-image-pg-17.4-alpine.png
│ ├── docker-compose-result-for-first-time-pull-image-pg-latest.png
│ ├── dot-env-file-for-postgres_1.png
│ ├── dot-env-file-for-postgres_2.png
│ ├── first_connexion_to_pgadmin_web.png
│ ├── initdb.d-directory.png
│ ├── pgAdmin_001.png
│ ├── pgAdmin_002.png
│ ├── pgAdmin_003.png
│ ├── pgAdmin_004.png
│ ├── pgAdmin_005.png
│ ├── pgadmin-web-001.png
│ ├── pgadmin-web-002.png
│ ├── pgadmin-web-003.png
│ ├── pgadmin-web-004.png
│ ├── pgadmin-web-005.png
│ ├── postgres-and-pgadmin-first-pull.png
│ ├── postgres-pgadmin-and-metabase-containers-running-in-rancher-desktop.png
│ ├── postgres-pgadmin-and-metabase-first-pull.png
│ ├── postgresql-original-wordmark.svg
│ ├── postgresql-plain-wordmark.svg
│ ├── postgresql.svg
│ ├── rancher-desktop-after-pull-image-pg-17.4-alpine.png
│ ├── rancher-desktop-after-pull-image-pg-latest.png
│ ├── stopping-the-containers-with-docker-compose.png
│ └── stopping-the-pg-container-with-docker-compose.png
├── postgresql-complete
│ ├── .env
│ ├── dc-postgresql-complete.yml
│ ├── initdb.d
│ │ ├── init.sql
│ │ └── pokemon.csv
│ ├── pgadmin_config_dir
│ │ └── .gitkeep
│ ├── pgadmin_working_dir
│ │ └── .gitkeep
│ └── postgresql_data
│ │ └── .gitkeep
├── postgresql-metabase
│ ├── .env
│ ├── dc-postgresql-metabase.yml
│ ├── initdb.d
│ │ ├── init.sql
│ │ └── pokemon.csv
│ └── postgresql_data
│ │ └── .gitkeep
├── postgresql-only
│ ├── .env
│ ├── dc-postgresql-only.yml
│ └── postgresql_data
│ │ └── .gitkeep
└── postgresql-pgadmin
│ ├── .env
│ ├── dc-postgresql-pgadmin.yml
│ ├── initdb.d
│ ├── init.sql
│ └── pokemon.csv
│ ├── pgadmin_working_dir
│ └── .gitkeep
│ └── postgresql_data
│ └── .gitkeep
└── redis-docker-compose-examples
├── README.md
├── README_FR.md
├── assets
├── directory-structure.mm
└── docker-compose-file-redis.odg
├── cheatsheet
├── aide-memoire-commandes-redis.md
└── redis-commands-cheat-sheet.md
├── pics
├── docker-compose-result-for-first-time-pull.png
├── first-connection-to-redisinsight-001.png
├── first-connection-to-redisinsight-002.png
├── ouverture-shell-sur-instance-redis.png
└── redis-cluster-creation.png
└── redis-community-single
├── .env
├── dc-redis-single.yml
├── redis
├── conf
│ └── redis.conf
└── data
│ └── .gitkeep
└── redisinsight
└── data
└── .gitkeep
/.gitignore:
--------------------------------------------------------------------------------
1 | /cockroachdb-docker-compose-examples/cockroachdb-single/data/crdb/auxiliary
2 | /cockroachdb-docker-compose-examples/cockroachdb-single/data/crdb/logs
3 | /cockroachdb-docker-compose-examples/cockroachdb-single/data/crdb/cockroach-temp597872300
4 | /cockroachdb-docker-compose-examples/cockroachdb-single/data/crdb/*.log
5 | /cockroachdb-docker-compose-examples/cockroachdb-single/data/crdb/MANIFEST-000001
6 | /cockroachdb-docker-compose-examples/cockroachdb-single/data/crdb/marker.format-version.000003.004
7 | /cockroachdb-docker-compose-examples/cockroachdb-single/data/crdb/marker.manifest.000001.MANIFEST-000001
8 | /cockroachdb-docker-compose-examples/cockroachdb-single/data/crdb/OPTIONS-000003
9 | /cockroachdb-docker-compose-examples/cockroachdb-single/data/crdb/STORAGE_MIN_VERSION
10 | /cockroachdb-docker-compose-examples/cockroachdb-single/data/crdb/temp-dirs-record.txt
11 | /cockroachdb-docker-compose-examples/cockroachdb-single/data/crdb/cockroach.advertise-addr
12 | /cockroachdb-docker-compose-examples/cockroachdb-single/data/crdb/cockroach.advertise-sql-addr
13 | /cockroachdb-docker-compose-examples/cockroachdb-single/data/crdb/cockroach.http-addr
14 | /cockroachdb-docker-compose-examples/cockroachdb-single/data/crdb/cockroach.listen-addr
15 | /cockroachdb-docker-compose-examples/cockroachdb-single/data/crdb/cockroach.sql-addr
16 | /cockroachdb-docker-compose-examples/cockroachdb-single/data/crdb/CURRENT
17 | /cockroachdb-docker-compose-examples/cockroachdb-single/data/crdb/LOCK
18 | /cockroachdb-docker-compose-examples/cockroachdb-single/data/crdb/*.sst
19 | /cockroachdb-docker-compose-examples/cockroachdb-single/data/crdb/OPTIONS-000023
20 | /cockroachdb-docker-compose-examples/cockroachdb-single/data/crdb/MANIFEST-000015
21 | /cockroachdb-docker-compose-examples/cockroachdb-single/data/crdb/MANIFEST-000022
22 | /cockroachdb-docker-compose-examples/cockroachdb-single/data/crdb/marker.manifest.000003.MANIFEST-000022
23 | /cockroachdb-docker-compose-examples/cockroachdb-single/data/crdb/OPTIONS-000030
24 | /cockroachdb-docker-compose-examples/cockroachdb-single/data/crdb/MANIFEST-000029
25 | /cockroachdb-docker-compose-examples/cockroachdb-single/data/crdb/marker.manifest.000004.MANIFEST-000029
26 | /cockroachdb-docker-compose-examples/cockroachdb-single/data/crdb/OPTIONS-000033
27 | /cockroachdb-docker-compose-examples/cockroachdb-single/data/crdb/MANIFEST-000021
28 | /cockroachdb-docker-compose-examples/cockroachdb-single/data/crdb/MANIFEST-000032
29 | /cockroachdb-docker-compose-examples/cockroachdb-single/data/crdb/marker.manifest.000004.MANIFEST-000032
30 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_1/*.log
31 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_1/auxiliary
32 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_1/cockroach-temp472858544
33 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_1/logs
34 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_1/temp-dirs-record.txt
35 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_1/cockroach.advertise-addr
36 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_1/cockroach.advertise-sql-addr
37 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_1/cockroach.http-addr
38 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_1/cockroach.listen-addr
39 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_1/cockroach.sql-addr
40 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_1/CURRENT
41 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_1/LOCK
42 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_1/MANIFEST-000001
43 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_1/marker.format-version.000003.004
44 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_1/marker.manifest.000001.MANIFEST-000001
45 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_1/OPTIONS-000003
46 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_1/STORAGE_MIN_VERSION
47 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_2/cockroach.advertise-addr
48 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_2/cockroach.advertise-sql-addr
49 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_2/cockroach.http-addr
50 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_2/cockroach.listen-addr
51 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_2/cockroach.sql-addr
52 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_2/CURRENT
53 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_2/LOCK
54 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_2/MANIFEST-000001
55 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_2/MANIFEST-000014
56 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_2/marker.format-version.000003.004
57 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_2/marker.manifest.000002.MANIFEST-000014
58 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_2/OPTIONS-000015
59 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_2/STORAGE_MIN_VERSION
60 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_2/temp-dirs-record.txt
61 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_2/auxiliary
62 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_2/cockroach-temp687111992
63 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_2/logs
64 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_2/*.log
65 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_2/*.sst
66 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_3/cockroach.advertise-addr
67 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_3/cockroach.advertise-sql-addr
68 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_3/cockroach.http-addr
69 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_3/cockroach.listen-addr
70 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_3/cockroach.sql-addr
71 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_3/CURRENT
72 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_3/LOCK
73 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_3/MANIFEST-000001
74 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_3/MANIFEST-000015
75 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_3/marker.format-version.000003.004
76 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_3/marker.manifest.000002.MANIFEST-000015
77 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_3/OPTIONS-000016
78 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_3/STORAGE_MIN_VERSION
79 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_3/temp-dirs-record.txt
80 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_3/auxiliary
81 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_3/cockroach-temp136195704
82 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_3/logs
83 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_3/*.sst
84 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_3/*.log
85 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_1/*.sst
86 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_1/cockroach-temp156917096
87 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_1/MANIFEST-000016
88 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_1/marker.manifest.000002.MANIFEST-000016
89 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_1/OPTIONS-000017
90 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_2/OPTIONS-000067
91 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_2/cockroach-temp137052612
92 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_2/MANIFEST-000029
93 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_2/MANIFEST-000066
94 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_2/marker.manifest.000004.MANIFEST-000066
95 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_3/OPTIONS-000080
96 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_3/cockroach-temp565257604
97 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_3/MANIFEST-000064
98 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_3/MANIFEST-000079
99 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_3/marker.manifest.000005.MANIFEST-000079
100 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_1/cockroach-temp350181780
101 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_2/OPTIONS-000003
102 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_2/marker.manifest.000001.MANIFEST-000001
103 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_3/cockroach-temp116120208
104 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_3/marker.manifest.000001.MANIFEST-000001
105 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_3/OPTIONS-000003
106 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_1/cockroach-temp988130912
107 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_2/OPTIONS-000027
108 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_2/cockroach-temp489511556
109 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_2/MANIFEST-000026
110 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_2/marker.manifest.000002.MANIFEST-000026
111 | /cockroachdb-docker-compose-examples/cockroachdb-cluster/data/crdb_3/cockroach-temp439161636
112 | /consul-docker-compose-examples/consul-single/data/node-id
113 | /consul-docker-compose-examples/consul-single/data/raft
114 | /consul-docker-compose-examples/consul-single/data/serf
115 | /consul-docker-compose-examples/consul-single/data/checkpoint-signature
116 | /mariadb-docker-compose-examples/mariadb-single/mariadb/data/*.log
117 | /mariadb-docker-compose-examples/mariadb-single/mariadb/data/*.info
118 | /mariadb-docker-compose-examples/mariadb-single/mariadb/data/my_db
119 | /mariadb-docker-compose-examples/mariadb-single/mariadb/data/mysql
120 | /mariadb-docker-compose-examples/mariadb-single/mariadb/data/performance_schema
121 | /mariadb-docker-compose-examples/mariadb-single/mariadb/data/sys
122 | /mariadb-docker-compose-examples/mariadb-single/mariadb/data/aria_log.00000001
123 | /mariadb-docker-compose-examples/mariadb-single/mariadb/data/aria_log_control
124 | /mariadb-docker-compose-examples/mariadb-single/mariadb/data/ib_buffer_pool
125 | /mariadb-docker-compose-examples/mariadb-single/mariadb/data/ib_logfile0
126 | /mariadb-docker-compose-examples/mariadb-single/mariadb/data/ibdata1
127 | /mariadb-docker-compose-examples/mariadb-single/mariadb/data/ibtmp1
128 | /mariadb-docker-compose-examples/mariadb-single/mariadb/data/mysql_upgrade_info
129 | /mongodb-docker-compose-examples/mongodb-single/mongodb/data/db/journal
130 | /mongodb-docker-compose-examples/mongodb-single/mongodb/data/db/diagnostic.data
131 | /mongodb-docker-compose-examples/mongodb-single/mongodb/data/db/*.wt
132 | /mongodb-docker-compose-examples/mongodb-single/mongodb/data/db/*.turtle
133 | /mongodb-docker-compose-examples/mongodb-single/mongodb/data/db/*.lock
134 | /mongodb-docker-compose-examples/mongodb-single/mongodb/data/db/*.bson
135 | /mongodb-docker-compose-examples/mongodb-single/mongodb/data/db/WiredTiger
136 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@e9163190da18-plugins-expand
137 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@2e428721d41b
138 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@2e428721d41b-plugins-expand
139 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@2fb6d3772e07
140 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@2fb6d3772e07-plugins-expand
141 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@5e834cf917bf
142 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@5e834cf917bf-plugins-expand
143 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@8fadc200eb35
144 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@8fadc200eb35-plugins-expand
145 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@9af2b3a17caf
146 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@9af2b3a17caf-plugins-expand
147 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@35d8caa24652
148 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@35d8caa24652-plugins-expand
149 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@84be3a39a7d2
150 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@84be3a39a7d2-plugins-expand
151 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@834e89b3b7b5
152 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@834e89b3b7b5-plugins-expand
153 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@917fa873835a
154 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@917fa873835a-plugins-expand
155 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@30807aa7dea6
156 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@30807aa7dea6-plugins-expand
157 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@98440ebc0d02
158 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@98440ebc0d02-plugins-expand
159 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@1272355d3152
160 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@1272355d3152-plugins-expand
161 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@962678701b54
162 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@962678701b54-plugins-expand
163 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@aaf094487ce5
164 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@aaf094487ce5-plugins-expand
165 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@b73bbd3bdd14
166 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@b73bbd3bdd14-plugins-expand
167 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@cbe8e7011667
168 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@cbe8e7011667-plugins-expand
169 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@cc865ef6deda
170 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@cc865ef6deda-plugins-expand
171 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@d0847a6a5485
172 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@d0847a6a5485-plugins-expand
173 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@e9163190da18
174 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@e9163190da18-feature_flags
175 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@2e428721d41b-feature_flags
176 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@2fb6d3772e07-feature_flags
177 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@5e834cf917bf-feature_flags
178 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@8fadc200eb35-feature_flags
179 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@9af2b3a17caf-feature_flags
180 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@35d8caa24652-feature_flags
181 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@84be3a39a7d2-feature_flags
182 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@834e89b3b7b5-feature_flags
183 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@917fa873835a-feature_flags
184 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@30807aa7dea6-feature_flags
185 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@98440ebc0d02-feature_flags
186 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@1272355d3152-feature_flags
187 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@962678701b54-feature_flags
188 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@aaf094487ce5-feature_flags
189 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@b73bbd3bdd14-feature_flags
190 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@cbe8e7011667-feature_flags
191 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@cc865ef6deda-feature_flags
192 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@d0847a6a5485-feature_flags
193 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/log/*.log
194 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@9a7ae8bcae8f
195 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@9a7ae8bcae8f-plugins-expand
196 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@26c9a11e461a
197 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@26c9a11e461a-plugins-expand
198 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@9a7ae8bcae8f-feature_flags
199 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@26c9a11e461a.pid
200 | /rabbitmq-docker-compose-examples/rabbitmq-single/rabbitmq/data/rabbit@26c9a11e461a-feature_flags
201 | /neo4j-docker-compose-examples/neo4j-single/logs/*.log
202 | /neo4j-docker-compose-examples/neo4j-single/data/server_id
203 | /neo4j-docker-compose-examples/neo4j-single/data/databases
204 | /neo4j-docker-compose-examples/neo4j-single/data/dbms
205 | /neo4j-docker-compose-examples/neo4j-single/data/transactions
206 | /mongodb-docker-compose-examples/assets/*.odg#
207 | /redis-docker-compose-examples/redis-community-single/redisinsight/data/*.db
208 | /redis-docker-compose-examples/redis-community-single/redisinsight/data/tutorials
209 | /redis-docker-compose-examples/redis-community-single/redisinsight/data/commands
210 | /redis-docker-compose-examples/redis-community-single/redisinsight/data/content
211 | /redis-docker-compose-examples/redis-community-single/redisinsight/data/plugins
212 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Creative Commons Legal Code
2 |
3 | CC0 1.0 Universal
4 |
5 | CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
6 | LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
7 | ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
8 | INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
9 | REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
10 | PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
11 | THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
12 | HEREUNDER.
13 |
14 | Statement of Purpose
15 |
16 | The laws of most jurisdictions throughout the world automatically confer
17 | exclusive Copyright and Related Rights (defined below) upon the creator
18 | and subsequent owner(s) (each and all, an "owner") of an original work of
19 | authorship and/or a database (each, a "Work").
20 |
21 | Certain owners wish to permanently relinquish those rights to a Work for
22 | the purpose of contributing to a commons of creative, cultural and
23 | scientific works ("Commons") that the public can reliably and without fear
24 | of later claims of infringement build upon, modify, incorporate in other
25 | works, reuse and redistribute as freely as possible in any form whatsoever
26 | and for any purposes, including without limitation commercial purposes.
27 | These owners may contribute to the Commons to promote the ideal of a free
28 | culture and the further production of creative, cultural and scientific
29 | works, or to gain reputation or greater distribution for their Work in
30 | part through the use and efforts of others.
31 |
32 | For these and/or other purposes and motivations, and without any
33 | expectation of additional consideration or compensation, the person
34 | associating CC0 with a Work (the "Affirmer"), to the extent that he or she
35 | is an owner of Copyright and Related Rights in the Work, voluntarily
36 | elects to apply CC0 to the Work and publicly distribute the Work under its
37 | terms, with knowledge of his or her Copyright and Related Rights in the
38 | Work and the meaning and intended legal effect of CC0 on those rights.
39 |
40 | 1. Copyright and Related Rights. A Work made available under CC0 may be
41 | protected by copyright and related or neighboring rights ("Copyright and
42 | Related Rights"). Copyright and Related Rights include, but are not
43 | limited to, the following:
44 |
45 | i. the right to reproduce, adapt, distribute, perform, display,
46 | communicate, and translate a Work;
47 | ii. moral rights retained by the original author(s) and/or performer(s);
48 | iii. publicity and privacy rights pertaining to a person's image or
49 | likeness depicted in a Work;
50 | iv. rights protecting against unfair competition in regards to a Work,
51 | subject to the limitations in paragraph 4(a), below;
52 | v. rights protecting the extraction, dissemination, use and reuse of data
53 | in a Work;
54 | vi. database rights (such as those arising under Directive 96/9/EC of the
55 | European Parliament and of the Council of 11 March 1996 on the legal
56 | protection of databases, and under any national implementation
57 | thereof, including any amended or successor version of such
58 | directive); and
59 | vii. other similar, equivalent or corresponding rights throughout the
60 | world based on applicable law or treaty, and any national
61 | implementations thereof.
62 |
63 | 2. Waiver. To the greatest extent permitted by, but not in contravention
64 | of, applicable law, Affirmer hereby overtly, fully, permanently,
65 | irrevocably and unconditionally waives, abandons, and surrenders all of
66 | Affirmer's Copyright and Related Rights and associated claims and causes
67 | of action, whether now known or unknown (including existing as well as
68 | future claims and causes of action), in the Work (i) in all territories
69 | worldwide, (ii) for the maximum duration provided by applicable law or
70 | treaty (including future time extensions), (iii) in any current or future
71 | medium and for any number of copies, and (iv) for any purpose whatsoever,
72 | including without limitation commercial, advertising or promotional
73 | purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
74 | member of the public at large and to the detriment of Affirmer's heirs and
75 | successors, fully intending that such Waiver shall not be subject to
76 | revocation, rescission, cancellation, termination, or any other legal or
77 | equitable action to disrupt the quiet enjoyment of the Work by the public
78 | as contemplated by Affirmer's express Statement of Purpose.
79 |
80 | 3. Public License Fallback. Should any part of the Waiver for any reason
81 | be judged legally invalid or ineffective under applicable law, then the
82 | Waiver shall be preserved to the maximum extent permitted taking into
83 | account Affirmer's express Statement of Purpose. In addition, to the
84 | extent the Waiver is so judged Affirmer hereby grants to each affected
85 | person a royalty-free, non transferable, non sublicensable, non exclusive,
86 | irrevocable and unconditional license to exercise Affirmer's Copyright and
87 | Related Rights in the Work (i) in all territories worldwide, (ii) for the
88 | maximum duration provided by applicable law or treaty (including future
89 | time extensions), (iii) in any current or future medium and for any number
90 | of copies, and (iv) for any purpose whatsoever, including without
91 | limitation commercial, advertising or promotional purposes (the
92 | "License"). The License shall be deemed effective as of the date CC0 was
93 | applied by Affirmer to the Work. Should any part of the License for any
94 | reason be judged legally invalid or ineffective under applicable law, such
95 | partial invalidity or ineffectiveness shall not invalidate the remainder
96 | of the License, and in such case Affirmer hereby affirms that he or she
97 | will not (i) exercise any of his or her remaining Copyright and Related
98 | Rights in the Work or (ii) assert any associated claims and causes of
99 | action with respect to the Work, in either case contrary to Affirmer's
100 | express Statement of Purpose.
101 |
102 | 4. Limitations and Disclaimers.
103 |
104 | a. No trademark or patent rights held by Affirmer are waived, abandoned,
105 | surrendered, licensed or otherwise affected by this document.
106 | b. Affirmer offers the Work as-is and makes no representations or
107 | warranties of any kind concerning the Work, express, implied,
108 | statutory or otherwise, including without limitation warranties of
109 | title, merchantability, fitness for a particular purpose, non
110 | infringement, or the absence of latent or other defects, accuracy, or
111 | the present or absence of errors, whether or not discoverable, all to
112 | the greatest extent permissible under applicable law.
113 | c. Affirmer disclaims responsibility for clearing rights of other persons
114 | that may apply to the Work or any use thereof, including without
115 | limitation any person's Copyright and Related Rights in the Work.
116 | Further, Affirmer disclaims responsibility for obtaining any necessary
117 | consents, permissions or other rights required for any use of the
118 | Work.
119 | d. Affirmer understands and acknowledges that Creative Commons is not a
120 | party to this document and has no duty or obligation with respect to
121 | this CC0 or use of the Work.
122 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # docker-compose-examples
2 |
3 | Examples of _docker compose_ files for various technologies that provide a local developement environment .
4 | By no means examples to be used in production.
5 | The purpose is educational or to be an help to developers who need a _docker compose_ quickly for testing purpose and local development.
6 |
--------------------------------------------------------------------------------
/mongodb-docker-compose-examples/README.md:
--------------------------------------------------------------------------------
1 | # MongoDB
2 |
3 | This [small project](https://github.com/TGITS/docker-compose-examples) provides a _docker compose file_ and a minimalist directory structure that creates a local environment for the [MongoDB](https://www.mongodb.com/) database to be used for development and experimentation.
4 | Do not use this directly in a production enviroment or at your own risk !
5 | Two applications are provided by the _docker compose file_:
6 |
7 | * A MongoDB single instance
8 | * [mongo-express](https://github.com/mongo-express/mongo-express) which is a web-based MongoDB administration interface.
9 |
10 | This project has been developed and tested under Windows 11 Professional with [Podman](https://podman.io/) and Podman Desktop.
11 | However it should work on Windows, Mac and Linux, with [Docker](https://www.docker.com/), [Docker Desktop](https://www.docker.com/products/docker-desktop/) or [Rancher Desktop](https://rancherdesktop.io/).
12 |
13 | In all cases you need to have a container engine compatible with `docker` and `docker compose` available in the command line.
14 |
15 | On the container with the [MongoDB](https://www.mongodb.com/) database engine, there is also [MongoDB Shell](https://www.mongodb.com/try/download/shell). However, you can install it directly on your PC to access any MongoDB instances accessible on your network if you wish so.
16 |
17 | You can also install and use [Compass](https://www.mongodb.com/products/tools/compass). Compass is a graphical client to connect to MongoDB instances.
18 |
19 | ## Running the containers with the MongoDB instance
20 |
21 | To run the containers and the associated **MongoDB** instance with `docker compose`, open a shell, go to the `mongodb-docker-compose-examples/mongodb-single` directory and run the following command :
22 |
23 | ```txt
24 | docker compose -f dc-mongodb-single.yml up -d
25 | ```
26 |
27 | 
28 |
29 | In Docker Desktop, Rancher Desktop or Podman Desktop you should be able to see the container running (in the following screenshot it is with Podman Desktop).
30 |
31 | 
32 |
33 | ### Accessing MongoDB with the CLI in the container
34 |
35 | To check that all is ok, you can open a shell on the container and connect to the MongoDB instance with the CLI by running `mongosh` as described thereafter :
36 |
37 | * To be connected as administrator and be able to see available users and databases
38 | * `mongosh --port 27017 --authenticationDatabase "admin" -u "root" -p`
39 | * You will be asked the password (it is defined in the `.env` file in the variable `MONGO_INITDB_ROOT_PASSWORD`)
40 | * you can show the databases with `show dbs`
41 |
42 | 
43 |
44 | * To be connected as the user defined in the `mongo-init.js` file (`jon_snow`) :
45 | * `mongosh got_db -u "jon_snow" -p`
46 | * You has then to type the password specified for the user `jon_snow` in the `mongo-init.js` file (the password is `ygritte` by the way)
47 | * You can express a query against the database : `db.got_seasons_collection.find({}, { season : 1, year : 1 })`
48 |
49 | 
50 |
51 | If you want to stop the containers, you just have to execute in the command line the following command (considering you still are in the directory `mongodb-docker-compose-examples/mongodb-single`) :
52 |
53 | ```txt
54 | docker compose -f dc-mongodb-single.yml down
55 | ```
56 |
57 | ### Accessing MongoDB with mongo-express
58 |
59 | You have to access by pointing your browser to the url `http:\\localhost:8081`. You will be prompted to enter a login and a password : you type the value defined for `MONGO_EXPRESS_USERNAME` and `MONGO_EXPRESS_PASSWORD` in the `.env` file.
60 |
61 | 
62 |
63 | You then have access to the `mongo-express` Web UI connected to your local MongoDB instance.
64 |
65 | 
66 |
67 | ## Installing MongoDB Shell on your computer and using it to connect to the MongoDB instance
68 |
69 | You can download and install [Mongosh](https://www.mongodb.com/try/download/shell) directly on you PC.
70 | It is available as a zip archive, you just have to unzip it wherever it suits you and add the bin directory with the `mongosh` executable in your path.
71 | You then should be able to connect with `mongosh` to any instance of MongoDB if you provide the correct parameters.
72 | If you just type `mongosh` in a terminal, by default it will try to connect to a MongoDB instance on `127.0.0.1` and port `27017`.
73 | If your instance is up it will connect to it but you cannot do much because you will not be authenticated.
74 |
75 | So if we want to authenticate as user `jon_snow` which has rights on the database `got_db`, first we will switch to this database and then authenticate within the shell :
76 |
77 | ```txt
78 | use got_db
79 | db.auth("jon_snow", "ygritte")
80 | ```
81 |
82 | 
83 |
84 | You are now connected as user `jon_snow` and can express query against the database (for example `db.got_seasons_collection.find({}, { season : 1, year : 1 })`).
85 |
86 | ## Installing Compass and using it to accessing MongoDB
87 |
88 | If you prefer desktop graphical client you can install [Compass](https://www.mongodb.com/products/tools/compass).
89 | It can be downloaded and install in various format for various operating system.
90 | On Windows, it can be downloaded as a zip archive, an `.exe` and an `.msi`.
91 | The installation is quite straightforward but depending on the installation package downloaded you may have to create the desktop shortcut yourself and add the binary to the path.
92 | When all is correctly setup you should be able to run [Compass](https://www.mongodb.com/products/tools/compass).
93 |
94 | 
95 |
96 | You can now connect to the local instance.
97 |
98 | 
99 |
100 | You can now connect directly or save the connection to not have to type the information again before the connection occurs.
101 |
102 | 
103 |
104 | ## Installing Visual Studio Code Plugin
105 |
106 | If you use Visual Studio Code you can install [an official extension](https://www.mongodb.com/products/tools/vs-code) that allows you to access a MongoDB instance.
107 |
108 | 
109 |
110 | When you have installed the extension, you just need to connect to your instance.
111 |
112 | 
113 |
114 | ")
115 |
116 | 
117 |
118 | The complete documentation of this plugin can be found on the [official site](https://www.mongodb.com/docs/mongodb-vscode/).
119 |
120 | ## Inner Workings
121 |
122 | The main directories and files of this project are quickly presented in the following pictures.
123 |
124 | 
125 |
126 | The following image gives a synthetic view of the docker compose file.
127 |
128 | 
129 |
130 | The `.env` file defined some system variables used in the docker compose file :
131 |
132 | ```yaml
133 | MONGO_INITDB_ROOT_USERNAME=root
134 | MONGO_INITDB_ROOT_PASSWORD=password
135 | MONGO_EXPRESS_USERNAME=admin
136 | MONGO_EXPRESS_PASSWORD=password
137 | ```
138 |
139 | You can of course change the values to your liking if necessary.
140 |
141 | The docker compose file is quite simple and straightforward.
142 |
143 | ```yaml
144 | services:
145 | mongodb:
146 | image: mongo:latest
147 | container_name: mongodb
148 | hostname: mongodb
149 | volumes:
150 | - ./mongodb/initdb.d/mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
151 | - mongodb-data:/data/db/
152 | - mongodb-log:/var/log/mongodb/
153 | env_file:
154 | - .env
155 | environment:
156 | MONGO_INITDB_ROOT_USERNAME: ${MONGO_INITDB_ROOT_USERNAME}
157 | MONGO_INITDB_ROOT_PASSWORD: ${MONGO_INITDB_ROOT_PASSWORD}
158 | ports:
159 | - "27017:27017"
160 | networks:
161 | - mongodb_network
162 |
163 | mongo-express:
164 | image: mongo-express:latest
165 | container_name: mongo-express
166 | restart: always
167 | environment:
168 | ME_CONFIG_MONGODB_ADMINUSERNAME: ${MONGO_INITDB_ROOT_USERNAME}
169 | ME_CONFIG_MONGODB_ADMINPASSWORD: ${MONGO_INITDB_ROOT_PASSWORD}
170 | ME_CONFIG_MONGODB_PORT: 27017
171 | ME_CONFIG_MONGODB_SERVER: 'mongodb'
172 | ME_CONFIG_BASICAUTH_USERNAME: ${MONGO_EXPRESS_USERNAME}
173 | ME_CONFIG_BASICAUTH_PASSWORD: ${MONGO_EXPRESS_PASSWORD}
174 | ports:
175 | - 8081:8081
176 | networks:
177 | - mongodb_network
178 | depends_on:
179 | - mongodb
180 |
181 | volumes:
182 | mongodb-data:
183 | driver: local
184 | name: mongo-data
185 | mongodb-log:
186 | driver: local
187 | name: mongo-log
188 |
189 | networks:
190 | mongodb_network:
191 | driver: bridge
192 | name: mongo-network
193 | ```
194 |
195 | Two services are defined, one for `mongodb` and one for `mongo-express`.
196 | In each case, the image retrieved is the `latest`.
197 | You can (and in some case you should) change to point to a specific version of `MongoDB` or `mongo-express`.
198 | A network and two volumes are defined.
199 | The file `mongo-init.js` is mapped to a specific file inside the container.
200 | You can note the `:ro` which means the volume is only readonly.
201 | This file creates a database, a user with read et write rights on it and a collection in it, populated with some data (the list of episodes of the TV Show **A Game of Thrown**).
202 |
203 | Of course, you can customize this initialization file to you specific use case, or event get rid of it if need be (in this case do not forget to delete the line `- ./mongodb/initdb.d/mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro`).
204 |
205 | ```json
206 | db = db.getSiblingDB("got_db");
207 |
208 | db.createUser({
209 | user: "jon_snow",
210 | pwd: "ygritte",
211 | roles: [
212 | {
213 | role: 'readWrite',
214 | db: 'got_db'
215 | },
216 | ],
217 | });
218 |
219 | db.createCollection("got_seasons_collection");
220 |
221 | db.got_seasons_collection.insertMany([
222 | {
223 | season: "1",
224 | year: "2011",
225 | episodes: [
226 | {
227 | number_overall: "1",
228 | number_in_season: "1",
229 | title: "Winter Is Coming",
230 | directors: ["Tim Van Patten"],
231 | writers: ["David Benioff", "D. B. Weiss"],
232 | original_air_date: "April 17, 2011",
233 | number_us_viewers: "2.22",
234 | },
235 | ...
236 | {
237 | number_overall: "73",
238 | number_in_season: "6",
239 | title: "The Iron Throne",
240 | directors: ["David Benioff", "D. B. Weiss"],
241 | writers: ["David Benioff", "D. B. Weiss"],
242 | original_air_date: "May 19, 2019",
243 | number_us_viewers: "13.61",
244 | },
245 | ],
246 | },
247 | ]);
248 | ```
249 |
250 | 
251 |
252 | If you really do not want to have an initial user, database and collection created with your MongoDB instance, you can use `mongodb-empty-single/dc-mongodb-empty-single.yml` instead of `mongodb-single/dc-mongodb-single.yml` : the working principles are identical, there is just no initialization of the instance with data.
253 |
254 | ```txt
255 | docker compose -f dc-mongodb-empty-single.yml up -d
256 | ```
257 |
258 | With all this you should have a base for a local development environment for MongoDB, that you can customize if you need to.
259 | It's now up to you to explore MongoDB with it.
260 |
261 | ## Bibliography
262 |
263 | * The [blog post on Medium](https://medium.com/norsys-octogone/a-local-environment-for-mongodb-with-docker-compose-ba52445b93ed) associated with this repository.
264 | * [Documentation](https://www.mongodb.com/docs/) on the [official MongoDB site](https://www.mongodb.com/)
265 | * [db.auth()](https://www.mongodb.com/docs/manual/reference/method/db.auth/)
266 | * [Docker and MongoDB](https://www.mongodb.com/compatibility/docker)
267 | * [MongoDB Official Docker Image](https://hub.docker.com/_/mongo)
268 | * [mongo-express official image](https://hub.docker.com/_/mongo-express)
269 | * [How to Run MongoDB as a Docker Container?](https://www.geeksforgeeks.org/how-to-run-mongodb-as-a-docker-container/)
270 | * [Quick MongoDB Docker Setup](https://cj-hewett.medium.com/quick-mongodb-docker-setup-d1959c8fc8f2)
271 | * [Docker: Initialize custom users and databases in MongoDb](https://dev.to/mikelogaciuk/docker-initialize-custom-users-and-databases-in-mongodb-3dkb)
272 | * [How to Run an Init Script for MongoDB in Docker Container](https://becomegeeks.com/blog/how-to-run-an-init-script-for-mongodb-in-docker-container/)
273 |
--------------------------------------------------------------------------------
/mongodb-docker-compose-examples/assets/directory-structure.mm:
--------------------------------------------------------------------------------
1 |
152 |
--------------------------------------------------------------------------------
/mongodb-docker-compose-examples/assets/docker-compose-file.odg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/mongodb-docker-compose-examples/assets/docker-compose-file.odg
--------------------------------------------------------------------------------
/mongodb-docker-compose-examples/assets/mongo-initialization-file.odg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/mongodb-docker-compose-examples/assets/mongo-initialization-file.odg
--------------------------------------------------------------------------------
/mongodb-docker-compose-examples/mongodb-empty-single/.env:
--------------------------------------------------------------------------------
1 | # MongoDB Environment
2 | MONGO_INITDB_ROOT_USERNAME=root
3 | MONGO_INITDB_ROOT_PASSWORD=password
4 | MONGO_EXPRESS_USERNAME=admin
5 | MONGO_EXPRESS_PASSWORD=password
--------------------------------------------------------------------------------
/mongodb-docker-compose-examples/mongodb-empty-single/dc-mongodb-empty-single.yml:
--------------------------------------------------------------------------------
1 | services:
2 | mongodb:
3 | image: mongo:latest
4 | container_name: mongodb
5 | hostname: mongodb
6 | volumes:
7 | - mongodb-data:/data/db/
8 | - mongodb-log:/var/log/mongodb/
9 | env_file:
10 | - .env
11 | environment:
12 | MONGO_INITDB_ROOT_USERNAME: ${MONGO_INITDB_ROOT_USERNAME}
13 | MONGO_INITDB_ROOT_PASSWORD: ${MONGO_INITDB_ROOT_PASSWORD}
14 | ports:
15 | - "27017:27017"
16 | networks:
17 | - mongodb_network
18 |
19 | mongo-express:
20 | image: mongo-express:latest
21 | container_name: mongo-express
22 | restart: always
23 | environment:
24 | ME_CONFIG_MONGODB_ADMINUSERNAME: ${MONGO_INITDB_ROOT_USERNAME}
25 | ME_CONFIG_MONGODB_ADMINPASSWORD: ${MONGO_INITDB_ROOT_PASSWORD}
26 | ME_CONFIG_MONGODB_PORT: 27017
27 | ME_CONFIG_MONGODB_SERVER: 'mongodb'
28 | ME_CONFIG_BASICAUTH_USERNAME: ${MONGO_EXPRESS_USERNAME}
29 | ME_CONFIG_BASICAUTH_PASSWORD: ${MONGO_EXPRESS_PASSWORD}
30 | ports:
31 | - 8081:8081
32 | networks:
33 | - mongodb_network
34 | depends_on:
35 | - mongodb
36 |
37 | volumes:
38 | mongodb-data:
39 | driver: local
40 | name: mongo-data
41 | mongodb-log:
42 | driver: local
43 | name: mongo-log
44 |
45 | networks:
46 | mongodb_network:
47 | driver: bridge
48 | name: mongo-network
49 |
--------------------------------------------------------------------------------
/mongodb-docker-compose-examples/mongodb-single/.env:
--------------------------------------------------------------------------------
1 | # MongoDB Environment
2 | MONGO_INITDB_ROOT_USERNAME=root
3 | MONGO_INITDB_ROOT_PASSWORD=password
4 | MONGO_EXPRESS_USERNAME=admin
5 | MONGO_EXPRESS_PASSWORD=password
--------------------------------------------------------------------------------
/mongodb-docker-compose-examples/mongodb-single/dc-mongodb-single.yml:
--------------------------------------------------------------------------------
1 | services:
2 | mongodb:
3 | image: mongo:latest
4 | container_name: mongodb
5 | hostname: mongodb
6 | volumes:
7 | - ./mongodb/initdb.d/mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
8 | - mongodb-data:/data/db/
9 | - mongodb-log:/var/log/mongodb/
10 | env_file:
11 | - .env
12 | environment:
13 | MONGO_INITDB_ROOT_USERNAME: ${MONGO_INITDB_ROOT_USERNAME}
14 | MONGO_INITDB_ROOT_PASSWORD: ${MONGO_INITDB_ROOT_PASSWORD}
15 | ports:
16 | - "27017:27017"
17 | networks:
18 | - mongodb_network
19 |
20 | mongo-express:
21 | image: mongo-express:latest
22 | container_name: mongo-express
23 | restart: always
24 | environment:
25 | ME_CONFIG_MONGODB_ADMINUSERNAME: ${MONGO_INITDB_ROOT_USERNAME}
26 | ME_CONFIG_MONGODB_ADMINPASSWORD: ${MONGO_INITDB_ROOT_PASSWORD}
27 | ME_CONFIG_MONGODB_PORT: 27017
28 | ME_CONFIG_MONGODB_SERVER: 'mongodb'
29 | ME_CONFIG_BASICAUTH_USERNAME: ${MONGO_EXPRESS_USERNAME}
30 | ME_CONFIG_BASICAUTH_PASSWORD: ${MONGO_EXPRESS_PASSWORD}
31 | ports:
32 | - 8081:8081
33 | networks:
34 | - mongodb_network
35 | depends_on:
36 | - mongodb
37 |
38 | volumes:
39 | mongodb-data:
40 | driver: local
41 | name: mongo-data
42 | mongodb-log:
43 | driver: local
44 | name: mongo-log
45 |
46 | networks:
47 | mongodb_network:
48 | driver: bridge
49 | name: mongo-network
50 |
--------------------------------------------------------------------------------
/mongodb-docker-compose-examples/mongodb-single/mongodb/initdb.d/mongo-init.js:
--------------------------------------------------------------------------------
1 | db = db.getSiblingDB("got_db");
2 |
3 | db.createUser({
4 | user: "jon_snow",
5 | pwd: "ygritte",
6 | roles: [
7 | {
8 | role: 'readWrite',
9 | db: 'got_db'
10 | },
11 | ],
12 | });
13 |
14 | db.createCollection("got_seasons_collection");
15 |
16 | db.got_seasons_collection.insertMany([
17 | {
18 | season: "1",
19 | year: "2011",
20 | episodes: [
21 | {
22 | number_overall: "1",
23 | number_in_season: "1",
24 | title: "Winter Is Coming",
25 | directors: ["Tim Van Patten"],
26 | writers: ["David Benioff", "D. B. Weiss"],
27 | original_air_date: "April 17, 2011",
28 | number_us_viewers: "2.22",
29 | },
30 | {
31 | number_overall: "2",
32 | number_in_season: "2",
33 | title: "The Kingsroad",
34 | directors: ["Tim Van Patten"],
35 | writers: ["David Benioff", "D. B. Weiss"],
36 | original_air_date: "April 24,2011",
37 | number_us_viewers: "2.20",
38 | },
39 | {
40 | number_overall: "3",
41 | number_in_season: "3",
42 | title: "Lord Snow",
43 | directors: ["Brian Kirk"],
44 | writers: ["David Benioff", "D. B. Weiss"],
45 | original_air_date: "May 1, 2011",
46 | number_us_viewers: "2.44",
47 | },
48 | {
49 | number_overall: "4",
50 | number_in_season: "4",
51 | title: "Cripples, Bastards, and Broken Things",
52 | directors: ["Brian Kirk"],
53 | writers: ["Bryan Cogman"],
54 | original_air_date: "May 1,2011",
55 | number_us_viewers: "2.45",
56 | },
57 | {
58 | number_overall: "5",
59 | number_in_season: "5",
60 | title: "The Wolf and the Lion",
61 | directors: ["Brian Kirk"],
62 | writers: ["David Benioff", "D. B. Weiss"],
63 | original_air_date: "May 15,2011",
64 | number_us_viewers: "2.58",
65 | },
66 | {
67 | number_overall: "6",
68 | number_in_season: "6",
69 | title: "A Golden Crown",
70 | directors: ["Daniel Minahan"],
71 | writers: ["David Benioff", "D. B. Weiss", "Jane Espenson"],
72 | original_air_date: "May 22, 2011",
73 | number_us_viewers: "2.44",
74 | },
75 | {
76 | number_overall: "7",
77 | number_in_season: "7",
78 | title: "You Win or You Die",
79 | directors: ["Daniel Minahan"],
80 | writers: ["David Benioff", "D. B. Weiss"],
81 | original_air_date: "May 29,2011",
82 | number_us_viewers: "2.40",
83 | },
84 | {
85 | number_overall: "8",
86 | number_in_season: "8",
87 | title: "The Pointy End",
88 | directors: ["Daniel Minahan"],
89 | writers: ["George R. R. Martin"],
90 | original_air_date: "June 05, 2011",
91 | number_us_viewers: "2.72",
92 | },
93 | {
94 | number_overall: "9",
95 | number_in_season: "9",
96 | title: "Baelor",
97 | directors: ["Alan Taylor"],
98 | writers: ["David Benioff", "D. B. Weiss"],
99 | original_air_date: "June 12, 2011",
100 | number_us_viewers: "2.66",
101 | },
102 | {
103 | number_overall: "10",
104 | number_in_season: "10",
105 | title: "Fire and Blood",
106 | directors: ["Alan Taylor"],
107 | writers: ["David Benioff", "D. B. Weiss"],
108 | original_air_date: "June 19, 2011",
109 | number_us_viewers: "3.04",
110 | },
111 | ],
112 | },
113 | {
114 | season: "2",
115 | year: "2012",
116 | episodes: [
117 | {
118 | number_overall: "11",
119 | number_in_season: "1",
120 | title: "The North Remembers",
121 | directors: ["Alan Taylor"],
122 | writers: ["David Benioff", "D. B. Weiss"],
123 | original_air_date: "April 1, 2012",
124 | number_us_viewers: "3.86",
125 | },
126 | {
127 | number_overall: "12",
128 | number_in_season: "2",
129 | title: "Nightlands",
130 | directors: ["Alan Taylor"],
131 | writers: ["David Benioff", "D. B. Weiss"],
132 | original_air_date: "April 8, 2012",
133 | number_us_viewers: "3.76",
134 | },
135 | {
136 | number_overall: "13",
137 | number_in_season: "3",
138 | title: "What Is Dead May Never Die",
139 | directors: ["Alik Sakharov"],
140 | writers: ["Bryan Cogman"],
141 | original_air_date: "April 15 ,2012",
142 | number_us_viewers: "3.77",
143 | },
144 | {
145 | number_overall: "14",
146 | number_in_season: "4",
147 | title: "Garden of Bones",
148 | directors: ["David Petrarca"],
149 | writers: ["Vanessa Taylor"],
150 | original_air_date: "April 22, 012",
151 | number_us_viewers: "3.65",
152 | },
153 | {
154 | number_overall: "15",
155 | number_in_season: "5",
156 | title: "The Ghost of Harrenhal",
157 | directors: ["David Petrarca"],
158 | writers: ["David Benioff", "D. B. Weiss"],
159 | original_air_date: "April 29, 2012",
160 | number_us_viewers: "3.90",
161 | },
162 | {
163 | number_overall: "16",
164 | number_in_season: "6",
165 | title: "The Old Gods and the New",
166 | directors: ["David Nutter"],
167 | writers: ["Vanessa Taylor"],
168 | original_air_date: "May 6, 2012",
169 | number_us_viewers: "3.88",
170 | },
171 | {
172 | number_overall: "17",
173 | number_in_season: "7",
174 | title: "A Man Without Honor",
175 | directors: ["David Nutter"],
176 | writers: ["David Benioff", "D.B. Weiss"],
177 | original_air_date: "May 13, 2012",
178 | number_us_viewers: "3.69",
179 | },
180 | {
181 | number_overall: "18",
182 | number_in_season: "8",
183 | title: "The Prince of Winterfell",
184 | directors: ["Alan Taylor"],
185 | writers: ["David Benioff", "D.B. Weiss"],
186 | original_air_date: "May 20, 2012",
187 | number_us_viewers: "3.86",
188 | },
189 | {
190 | number_overall: "19",
191 | number_in_season: "9",
192 | title: "Blackwater",
193 | directors: ["Neil Marshall"],
194 | writers: ["George R. R. Martin"],
195 | original_air_date: "May 27, 2012",
196 | number_us_viewers: "3.38",
197 | },
198 | {
199 | number_overall: "20",
200 | number_in_season: "10",
201 | title: "Valar Morghulis",
202 | directors: ["Alan Taylor"],
203 | writers: ["David Benioff", "D. B. Weiss"],
204 | original_air_date: "June 3, 2012",
205 | number_us_viewers: "4.20",
206 | },
207 | ],
208 | },
209 | {
210 | season: "3",
211 | year: "2013",
212 | episodes: [
213 | {
214 | number_overall: "21",
215 | number_in_season: "1",
216 | title: "Valar Dohaeris",
217 | directors: ["Daniel Minahan"],
218 | writers: ["David Benioff", "D. B. Weiss"],
219 | original_air_date: "March 31, 2013",
220 | number_us_viewers: "4.37",
221 | },
222 | {
223 | number_overall: "22",
224 | number_in_season: "2",
225 | title: "Dark Wings, Dark Words",
226 | directors: ["Daniel Minahan"],
227 | writers: ["Vanessa Taylor"],
228 | original_air_date: "April 7, 2013",
229 | number_us_viewers: "4.27",
230 | },
231 | {
232 | number_overall: "23",
233 | number_in_season: "3",
234 | title: "Walk of Punishment",
235 | directors: ["David Benioff", "D.B. Weiss"],
236 | writers: ["David Benioff", "D.B. Weiss"],
237 | original_air_date: "April 14, 2013",
238 | number_us_viewers: "4.72",
239 | },
240 | {
241 | number_overall: "24",
242 | number_in_season: "4",
243 | title: "And Now His Watch Is Ended",
244 | directors: ["Alex Graves"],
245 | writers: ["David Benioff", "D.B. Weiss"],
246 | original_air_date: "April 21, 2013",
247 | number_us_viewers: "4.87",
248 | },
249 | {
250 | number_overall: "25",
251 | number_in_season: "5",
252 | title: "Kissed by Fire",
253 | directors: ["Alex Graves"],
254 | writers: ["Bryan Cogman"],
255 | original_air_date: "April 28, 2013",
256 | number_us_viewers: "5.35",
257 | },
258 | {
259 | number_overall: "26",
260 | number_in_season: "6",
261 | title: "The Climb",
262 | directors: ["Alik Sakharov"],
263 | writers: ["David Benioff", "D.B. Weiss"],
264 | original_air_date: "May 5, 2013",
265 | number_us_viewers: "5.50",
266 | },
267 | {
268 | number_overall: "27",
269 | number_in_season: "7",
270 | title: "The Bear and the Maiden Fair",
271 | directors: ["Michelle MacLaren"],
272 | writers: ["George R. R. Martin"],
273 | original_air_date: "May 12, 2013",
274 | number_us_viewers: "4.84",
275 | },
276 | {
277 | number_overall: "28",
278 | number_in_season: "8",
279 | title: "Second Sons",
280 | directors: ["Michelle MacLaren"],
281 | writers: ["David Benioff", "D.B. Weiss"],
282 | original_air_date: "May 19, 2013",
283 | number_us_viewers: "5.13",
284 | },
285 | {
286 | number_overall: "29",
287 | number_in_season: "9",
288 | title: "The Rains of Castamere",
289 | directors: ["David Nutter"],
290 | writers: ["David Benioff", "D.B. Weiss"],
291 | original_air_date: "June 2, 2013",
292 | number_us_viewers: "5.22",
293 | },
294 | {
295 | number_overall: "30",
296 | number_in_season: "10",
297 | title: "Mhysa",
298 | directors: ["David Nutter"],
299 | writers: ["David Benioff", "D.B. Weiss"],
300 | original_air_date: "June 9, 2013",
301 | number_us_viewers: "5.39",
302 | },
303 | ],
304 | },
305 | {
306 | season: "4",
307 | year: "2014",
308 | episodes: [
309 | {
310 | number_overall: "31",
311 | number_in_season: "1",
312 | title: "Two Swords",
313 | directors: ["D.B. Weiss"],
314 | writers: ["David Benioff", "D. B. Weiss"],
315 | original_air_date: "April 6, 2014",
316 | number_us_viewers: "6.64",
317 | },
318 | {
319 | number_overall: "32",
320 | number_in_season: "2",
321 | title: "The Lion and the Rose",
322 | directors: ["Alex Graves"],
323 | writers: ["George R.R. Martin"],
324 | original_air_date: "April 13, 2014",
325 | number_us_viewers: "6.31",
326 | },
327 | {
328 | number_overall: "33",
329 | number_in_season: "3",
330 | title: "Breaker of Chains",
331 | directors: ["Alex Graves"],
332 | writers: ["David Benioff", "D.B. Weiss"],
333 | original_air_date: "April 20, 2014",
334 | number_us_viewers: "6.59",
335 | },
336 | {
337 | number_overall: "34",
338 | number_in_season: "4",
339 | title: "Oathkeeper",
340 | directors: ["Michelle McLaren"],
341 | writers: ["Bryan Cogman"],
342 | original_air_date: "April 27, 2014",
343 | number_us_viewers: "6.95",
344 | },
345 | {
346 | number_overall: "35",
347 | number_in_season: "5",
348 | title: "First of His Name",
349 | directors: ["Michelle McLaren"],
350 | writers: ["David Benioff", "D.B. Weiss"],
351 | original_air_date: "May 4, 2014",
352 | number_us_viewers: "7.16",
353 | },
354 | {
355 | number_overall: "36",
356 | number_in_season: "6",
357 | title: "The Laws of Gods and Men",
358 | directors: ["Alik Sakharov"],
359 | writers: ["Bryan Cogman"],
360 | original_air_date: "May 11, 2014",
361 | number_us_viewers: "6.40",
362 | },
363 | {
364 | number_overall: "37",
365 | number_in_season: "7",
366 | title: "Mockingbird",
367 | directors: ["Alik Sakharov"],
368 | writers: ["David Benioff", "D.B. Weiss"],
369 | original_air_date: "May 18, 2014",
370 | number_us_viewers: "7.20",
371 | },
372 | {
373 | number_overall: "38",
374 | number_in_season: "8",
375 | title: "The Mountain and the Viper",
376 | directors: ["Alex Graves"],
377 | writers: ["David Benioff", "D.B. Weiss"],
378 | original_air_date: "June 1, 2014",
379 | number_us_viewers: "7.17",
380 | },
381 | {
382 | number_overall: "39",
383 | number_in_season: "9",
384 | title: "The Watchers on the Wall",
385 | directors: ["Neil Marshall"],
386 | writers: ["David Benioff", "D.B. Weiss"],
387 | original_air_date: "June 8, 2014",
388 | number_us_viewers: "6.95",
389 | },
390 | {
391 | number_overall: "40",
392 | number_in_season: "10",
393 | title: "The Children",
394 | directors: ["Alex Graves"],
395 | writers: ["David Benioff", "D.B. Weiss"],
396 | original_air_date: "June 15, 2014",
397 | number_us_viewers: "7.09",
398 | },
399 | ],
400 | },
401 | {
402 | season: "5",
403 | year: "2015",
404 | episodes: [
405 | {
406 | number_overall: "41",
407 | number_in_season: "1",
408 | title: "The Wars to Come",
409 | directors: ["Michael Slovis"],
410 | writers: ["David Benioff", "D. B. Weiss"],
411 | original_air_date: "April 12, 2015",
412 | number_us_viewers: "8.00",
413 | },
414 | {
415 | number_overall: "42",
416 | number_in_season: "2",
417 | title: "The House of Black and White",
418 | directors: ["Michael Slovis"],
419 | writers: ["David Benioff", "D.B. Weiss"],
420 | original_air_date: "April 19, 2015",
421 | number_us_viewers: "6.81",
422 | },
423 | {
424 | number_overall: "43",
425 | number_in_season: "3",
426 | title: "High Sparrow",
427 | directors: ["Mark Mylod"],
428 | writers: ["David Benioff", "D.B. Weiss"],
429 | original_air_date: "April 26, 2015",
430 | number_us_viewers: "6.71",
431 | },
432 | {
433 | number_overall: "44",
434 | number_in_season: "4",
435 | title: "Sons of the Harpy",
436 | directors: ["Mark Mylod"],
437 | writers: ["Dave Hill"],
438 | original_air_date: "May 4, 2015",
439 | number_us_viewers: "6.82",
440 | },
441 | {
442 | number_overall: "45",
443 | number_in_season: "5",
444 | title: "Kill the Boy",
445 | directors: ["Jeremy Podeswa"],
446 | writers: ["Bryan Cogman"],
447 | original_air_date: "May 10, 2015",
448 | number_us_viewers: "6.56",
449 | },
450 | {
451 | number_overall: "46",
452 | number_in_season: "6",
453 | title: "Unbowed, Unbent, Unbroken",
454 | directors: ["Jeremy Podeswa"],
455 | writers: ["Bryan Cogman"],
456 | original_air_date: "May 17, 2015",
457 | number_us_viewers: "6.24",
458 | },
459 | {
460 | number_overall: "47",
461 | number_in_season: "7",
462 | title: "The Gift",
463 | directors: ["Miguel Sapochnik"],
464 | writers: ["David Benioff", "D.B. Weiss"],
465 | original_air_date: "May 24, 2015",
466 | number_us_viewers: "5.40",
467 | },
468 | {
469 | number_overall: "48",
470 | number_in_season: "8",
471 | title: "Hardhome",
472 | directors: ["Miguel Sapochnik"],
473 | writers: ["David Benioff", "D.B. Weiss"],
474 | original_air_date: "May 31, 2015",
475 | number_us_viewers: "7.01",
476 | },
477 | {
478 | number_overall: "49",
479 | number_in_season: "9",
480 | title: "The Dance of Dragons",
481 | directors: ["David Nutter"],
482 | writers: ["David Benioff", "D.B. Weiss"],
483 | original_air_date: "June 7, 2015",
484 | number_us_viewers: "7.14",
485 | },
486 | {
487 | number_overall: "50",
488 | number_in_season: "10",
489 | title: "Mother's Mercy",
490 | directors: ["David Nutter"],
491 | writers: ["David Benioff", "D.B. Weiss"],
492 | original_air_date: "June 14, 2015",
493 | number_us_viewers: "8.11",
494 | },
495 | ],
496 | },
497 | {
498 | season: "6",
499 | year: "2016",
500 | episodes: [
501 | {
502 | number_overall: "51",
503 | number_in_season: "1",
504 | title: "The Red Woman",
505 | directors: ["Jeremy Podeswa"],
506 | writers: ["David Benioff", "D. B. Weiss"],
507 | original_air_date: "April 24, 2016",
508 | number_us_viewers: "7.94",
509 | },
510 | {
511 | number_overall: "52",
512 | number_in_season: "2",
513 | title: "Home",
514 | directors: ["Jeremy Podeswa"],
515 | writers: ["Dave Hill"],
516 | original_air_date: "May 1, 2016",
517 | number_us_viewers: "7.29",
518 | },
519 | {
520 | number_overall: "53",
521 | number_in_season: "3",
522 | title: "Oathbreaker",
523 | directors: ["Daniel Sackheim"],
524 | writers: ["David Benioff", "D. B. Weiss"],
525 | original_air_date: "May 8, 2016",
526 | number_us_viewers: "7.28",
527 | },
528 | {
529 | number_overall: "54",
530 | number_in_season: "4",
531 | title: "Book of the Stranger",
532 | directors: ["Daniel Sackheim"],
533 | writers: ["David Benioff", "D. B. Weiss"],
534 | original_air_date: "May 15, 2016",
535 | number_us_viewers: "7.82",
536 | },
537 | {
538 | number_overall: "55",
539 | number_in_season: "5",
540 | title: "The Door",
541 | directors: ["Jack Bender"],
542 | writers: ["David Benioff", "D. B. Weiss"],
543 | original_air_date: "May 22, 2016",
544 | number_us_viewers: "7,89",
545 | },
546 | {
547 | number_overall: "56",
548 | number_in_season: "6",
549 | title: "Blood of my Blood",
550 | directors: ["Jack Bender"],
551 | writers: ["Bryan Cogman"],
552 | original_air_date: "May 29, 2016",
553 | number_us_viewers: "6.71",
554 | },
555 | {
556 | number_overall: "57",
557 | number_in_season: "7",
558 | title: "The Broken Man",
559 | directors: ["Mark Mylod"],
560 | writers: ["Bryan Cogman"],
561 | original_air_date: "June 5, 2016",
562 | number_us_viewers: "7.80",
563 | },
564 | {
565 | number_overall: "58",
566 | number_in_season: "8",
567 | title: "No One",
568 | directors: ["Mark Mylod"],
569 | writers: ["David Benioff", "D. B. Weiss"],
570 | original_air_date: "June 12, 2016",
571 | number_us_viewers: "7.60",
572 | },
573 | {
574 | number_overall: "59",
575 | number_in_season: "9",
576 | title: "Battle of the Bastards",
577 | directors: ["Miguel Sapochnik"],
578 | writers: ["David Benioff", "D. B. Weiss"],
579 | original_air_date: "June 19, 2016",
580 | number_us_viewers: "7.66",
581 | },
582 | {
583 | number_overall: "60",
584 | number_in_season: "10",
585 | title: "The Winds of Winter",
586 | directors: ["Miguel Sapochnik"],
587 | writers: ["David Benioff", "D. B. Weiss"],
588 | original_air_date: "June 26, 2016",
589 | number_us_viewers: "8.89",
590 | },
591 | ],
592 | },
593 | {
594 | season: "7",
595 | year: "2017",
596 | episodes: [
597 | {
598 | number_overall: "61",
599 | number_in_season: "1",
600 | title: "Dragonstone",
601 | directors: ["Jeremy Podeswa"],
602 | writers: ["David Benioff", "D. B. Weiss"],
603 | original_air_date: "July 16, 2017",
604 | number_us_viewers: "10.11",
605 | },
606 | {
607 | number_overall: "62",
608 | number_in_season: "2",
609 | title: "Stormborn",
610 | directors: ["Mark Mylod"],
611 | writers: ["Bryan Cogman"],
612 | original_air_date: "July 23, 2017",
613 | number_us_viewers: "9.27",
614 | },
615 | {
616 | number_overall: "63",
617 | number_in_season: "3",
618 | title: "The Queen's Justice",
619 | directors: ["Mark Mylod"],
620 | writers: ["David Benioff", "D. B. Weiss"],
621 | original_air_date: "July 30, 2017",
622 | number_us_viewers: "9.25",
623 | },
624 | {
625 | number_overall: "64",
626 | number_in_season: "4",
627 | title: "The Spoils of War",
628 | directors: ["Matt Shakman"],
629 | writers: ["David Benioff", "D. B. Weiss"],
630 | original_air_date: "August 6, 2017",
631 | number_us_viewers: "10.17",
632 | },
633 | {
634 | number_overall: "65",
635 | number_in_season: "5",
636 | title: "Eastwatch",
637 | directors: ["Matt Shakman"],
638 | writers: ["Dave Hills"],
639 | original_air_date: "August 13, 2017",
640 | number_us_viewers: "10.72",
641 | },
642 | {
643 | number_overall: "66",
644 | number_in_season: "6",
645 | title: "Beyond the Wall",
646 | directors: ["Alan Taylor"],
647 | writers: ["David Benioff", "D. B. Weiss"],
648 | original_air_date: "August 20, 2017",
649 | number_us_viewers: "10.24",
650 | },
651 | {
652 | number_overall: "67",
653 | number_in_season: "7",
654 | title: "The Dragon and the Wolf",
655 | directors: ["Jeremy Podeswa"],
656 | writers: ["David Benioff", "D. B. Weiss"],
657 | original_air_date: "August 27, 2017",
658 | number_us_viewers: "12.1",
659 | },
660 | ],
661 | },
662 | {
663 | season: "8",
664 | year: "2019",
665 | episodes: [
666 | {
667 | number_overall: "68",
668 | number_in_season: "1",
669 | title: "Winterfell",
670 | directors: ["David Nutter"],
671 | writers: ["Dave Hill"],
672 | original_air_date: "April 14, 2019",
673 | number_us_viewers: "11.76",
674 | },
675 | {
676 | number_overall: "69",
677 | number_in_season: "2",
678 | title: "A Knight of the Seven Kingdoms",
679 | directors: ["David Nutter"],
680 | writers: ["Bryan Cogman"],
681 | original_air_date: "July 23, 2017",
682 | number_us_viewers: "9.27",
683 | },
684 | {
685 | number_overall: "70",
686 | number_in_season: "3",
687 | title: "The Long Night",
688 | directors: ["Miguel Sapochnik"],
689 | writers: ["David Benioff", "D. B. Weiss"],
690 | original_air_date: "April 28, 2019",
691 | number_us_viewers: "12.02",
692 | },
693 | {
694 | number_overall: "71",
695 | number_in_season: "4",
696 | title: "The Last of the Starks",
697 | directors: ["David Nutter"],
698 | writers: ["David Benioff", "D. B. Weiss"],
699 | original_air_date: "May 5, 2019",
700 | number_us_viewers: "11.80",
701 | },
702 | {
703 | number_overall: "72",
704 | number_in_season: "5",
705 | title: "The Bells",
706 | directors: ["Miguel Sapochnik"],
707 | writers: ["David Benioff", "D. B. Weiss"],
708 | original_air_date: "May 12, 2019",
709 | number_us_viewers: "12.48",
710 | },
711 | {
712 | number_overall: "73",
713 | number_in_season: "6",
714 | title: "The Iron Throne",
715 | directors: ["David Benioff", "D. B. Weiss"],
716 | writers: ["David Benioff", "D. B. Weiss"],
717 | original_air_date: "May 19, 2019",
718 | number_us_viewers: "13.61",
719 | },
720 | ],
721 | },
722 | ]);
723 |
--------------------------------------------------------------------------------
/mongodb-docker-compose-examples/pics/directory-structure.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/mongodb-docker-compose-examples/pics/directory-structure.jpg
--------------------------------------------------------------------------------
/mongodb-docker-compose-examples/pics/docker-compose-file-original.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/mongodb-docker-compose-examples/pics/docker-compose-file-original.png
--------------------------------------------------------------------------------
/mongodb-docker-compose-examples/pics/docker-compose-file.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/mongodb-docker-compose-examples/pics/docker-compose-file.png
--------------------------------------------------------------------------------
/mongodb-docker-compose-examples/pics/mongo-compass-001.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/mongodb-docker-compose-examples/pics/mongo-compass-001.png
--------------------------------------------------------------------------------
/mongodb-docker-compose-examples/pics/mongo-compass-002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/mongodb-docker-compose-examples/pics/mongo-compass-002.png
--------------------------------------------------------------------------------
/mongodb-docker-compose-examples/pics/mongo-compass-003.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/mongodb-docker-compose-examples/pics/mongo-compass-003.png
--------------------------------------------------------------------------------
/mongodb-docker-compose-examples/pics/mongo-compass.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/mongodb-docker-compose-examples/pics/mongo-compass.png
--------------------------------------------------------------------------------
/mongodb-docker-compose-examples/pics/mongo-express-connection-001.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/mongodb-docker-compose-examples/pics/mongo-express-connection-001.png
--------------------------------------------------------------------------------
/mongodb-docker-compose-examples/pics/mongo-express-connection-002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/mongodb-docker-compose-examples/pics/mongo-express-connection-002.png
--------------------------------------------------------------------------------
/mongodb-docker-compose-examples/pics/mongo-initialization-file.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/mongodb-docker-compose-examples/pics/mongo-initialization-file.png
--------------------------------------------------------------------------------
/mongodb-docker-compose-examples/pics/mongosh-from-terminal-001.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/mongodb-docker-compose-examples/pics/mongosh-from-terminal-001.png
--------------------------------------------------------------------------------
/mongodb-docker-compose-examples/pics/simple-docker-compose-4-single-node-mongodb-001.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/mongodb-docker-compose-examples/pics/simple-docker-compose-4-single-node-mongodb-001.png
--------------------------------------------------------------------------------
/mongodb-docker-compose-examples/pics/simple-docker-compose-4-single-node-mongodb-002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/mongodb-docker-compose-examples/pics/simple-docker-compose-4-single-node-mongodb-002.png
--------------------------------------------------------------------------------
/mongodb-docker-compose-examples/pics/simple-docker-compose-4-single-node-mongodb-003.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/mongodb-docker-compose-examples/pics/simple-docker-compose-4-single-node-mongodb-003.png
--------------------------------------------------------------------------------
/mongodb-docker-compose-examples/pics/simple-docker-compose-4-single-node-mongodb-004.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/mongodb-docker-compose-examples/pics/simple-docker-compose-4-single-node-mongodb-004.png
--------------------------------------------------------------------------------
/mongodb-docker-compose-examples/pics/vs-code-mongodb-extension-001.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/mongodb-docker-compose-examples/pics/vs-code-mongodb-extension-001.png
--------------------------------------------------------------------------------
/mongodb-docker-compose-examples/pics/vs-code-mongodb-extension-002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/mongodb-docker-compose-examples/pics/vs-code-mongodb-extension-002.png
--------------------------------------------------------------------------------
/mongodb-docker-compose-examples/pics/vs-code-mongodb-extension-003.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/mongodb-docker-compose-examples/pics/vs-code-mongodb-extension-003.png
--------------------------------------------------------------------------------
/mongodb-docker-compose-examples/pics/vs-code-mongodb-extension-004.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/mongodb-docker-compose-examples/pics/vs-code-mongodb-extension-004.png
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/README.md:
--------------------------------------------------------------------------------
1 | # Simple Docker Compose for a Single Instance Postgresql
2 |
3 | ## Running the container with the Postgresql instance
4 |
5 | To run the container and the associated with the associated Postgresql instance using `docker compose`, open a shell on your computer go to the `postgresql-docker-compose-examples/postgresql-complete` directory and run the following
6 |
7 | ```txt
8 | docker compose -f dc-postgresql-complete.yml up -d
9 | ```
10 |
11 | If your are on Windows, you can use WSL or if you have the docker engine installed (via Docker Desktop or Rancher Desktop) you can use Windows Powershell.
12 |
13 | 
14 |
15 | 
16 |
17 | The `.env` file defines the environment variables used in the docker compose file `dc-postgresql-complete.yml` for **PostgreSQL** and **pgAdmin** : `POSTGRES_DB`, `POSTGRES_USER`, `POSTGRES_PASSWORD`, which respectively corresponds to the name of a Postgres Database, the name of a user of this database and the password of this user. It also contains `PGADMIN_DEFAULT_EMAIL` which is necessary for **pgAdmin**.
18 | The Postgres instance will be created with this database and the associated user.
19 |
20 | ## Accessing the PostgreSQL instance with the CLI in the container
21 |
22 | To access your database instance with the dedicated CLI from a shell in the container itself :
23 |
24 | * open an interactive shell on the running container of our postgres instance : `docker exec -it postgres /bin/sh`
25 | * The container name defined in `dc-postgresql-complete.yml` is `postgres`
26 | * Running the Postgres CLI : `psql -W -Umydb -dmydb`.
27 | * With the option `-W`, you will be prompted for the password
28 | * The password is defined in the `.env` file, under the variable `POSTGRES_PASSWORD`
29 | * You can execute a query. For example you can try
30 |
31 | ```sql
32 | SELECT * FROM public.pokemon
33 | LIMIT 10;
34 | ```
35 |
36 | * To quit `psql` you can type `exit`
37 | * To quit the shell you can also type `exit`
38 |
39 | 
40 |
41 | ## Accessing the PostgreSQL instance with pgAdmin
42 |
43 | When the containers are up, **pgAdmin** will be available on `localhost:5433`
44 | To configure **pgAdmin** :
45 |
46 | * When the application is started, on your first run, you should have something similar to the next screenshot. You have to provide the values of the environment variables `PGADMIN_DEFAULT_EMAIL` and `PGADMIN_DEFAULT_PASSWORD`
47 |
48 | 
49 |
50 | * You first need to register a new server by a right click on `Servers` in the `Object explorer`
51 |
52 | 
53 |
54 | * A popup window with several tabs should appear.
55 | * In the `General` tab you have to fill the `Name` field (this is the name you want to give to your PostgreSQL Instance, it can be whatever you want). You should also toggle on the `Connect now ?` button.
56 |
57 | 
58 |
59 | * In the `Connection` tab, you have to fill the `Host name/address` field with the value `postgres` (the host name of the PostgreSQL instance in the container), the `Port` field with the value `5432`, and the fields `Maintenance database`, `Username` and `Password` with respectively the values of the environment variables `POSTGRES_DB`, `POSTGRES_USER`, and `POSTGRES_PASSWORD`.
60 |
61 | 
62 |
63 | * When you click on the `Save` button, **pgAdmin** should connect to the database server and it should appear in the `Object Explorer` panel.
64 |
65 | 
66 |
67 | * You can navigate to the table `Pokemon` which should have been initialized
68 |
69 | 
70 |
71 | ## Accessing the PostgreSQL instance with Metabase
72 |
73 | Metabase is not a database tool like **pgAdmin** or **DBeaver**. It is a _business intelligence_/_analytics_ platform : you will not directly do low level SQL requests or working directly on the Database. It's a tool to manipulate you data to extract information from them.
74 | As such it does not have the same use as pgAdmin but can be useful in its own right depending on your needs.
75 |
76 | When the containers are up, metabase will be available on `localhost:5434`.
77 |
78 | On the first connection, you will have to configure Metabase.
79 | As you can see in the first screenshot, the first screen is not necessarily in English (in French in my case, which corresponds to my locale).
80 | However you can choose the appropriate language for your configuration in the next screen.
81 | On this first screen, you just have to click on the button.
82 |
83 | 
84 |
85 | You choose the language for the user interface and then enter some _personal_ information (name, email, etc.)
86 |
87 | 
88 |
89 | You will next indicate what is your intended use of Metabase if you know it
90 |
91 | 
92 |
93 | You will next indicate to which kind of database you want to connect, in our case **PostgreSQL**.
94 |
95 | 
96 |
97 | After selecting **PostgreSQL**, you will have to configure your connection :
98 |
99 | * The host is `postgres` (as defined in the docker compose file)
100 | * The port is `5432` (as defined in the docker compose file)
101 | * The fields `Database name`, `Username` and `Password` should be filled respectively with the values of the environment variables `POSTGRES_DB`, `POSTGRES_USER`, `POSTGRES_PASSWORD` defined in the `.env` file.
102 | * You can now connect to the database.
103 |
104 | 
105 |
106 | You can finally give your usage data preferences.
107 |
108 | 
109 |
110 | At last, the configuration is done !
111 |
112 | 
113 |
114 | You can now explore your data.
115 | Metabase invites you to have a look at the table created at initialization (Here `Pokemon`).
116 |
117 | 
118 |
119 | You can start exploring the data.
120 |
121 | 
122 |
123 | ## Accessing the PostgreSQL instance with DBeaver
124 |
125 | [DBeaver Community](https://dbeaver.io/) is an open source and free tool that offers a graphical user interface to access various relational databases including Postgresql.
126 |
127 | After starting DBeaver :
128 |
129 | * Go in the menu `File` and select the `New` option (`File > New`) or use the shortcut `Ctrl+N`
130 | * Select `DBeaver > Database Connection` and click on the `Next` button
131 |
132 | 
133 |
134 | * Select `PostgreSQL` and click on the `Next` button
135 |
136 | 
137 |
138 | * A window with the connection settings to fill should open.
139 | * You should change the value for `Database` (should be the value associated with `POSTGRES_DB` in the `.env` file), for `Username` (should be the value associated with `POSTGRES_USER` in the `.env` file) and `Password` (should be the value associated with `POSTGRES_PASSWORD` in the `.env` file).
140 | * The default value for the other fields should be the values you need.
141 |
142 | 
143 |
144 | * If it is the first time you try to connect to a PostgreSQL Database, you will need to download the database driver.
145 | * To this end, you have to select the tab `Driver properties`
146 | * DBeaver should propose to download a PostgreSQL driver, you just have to click on the `Download` button.
147 | * When the driver has been downloaded, you will now see the driver properties and you just have to click on the `Finish` button.
148 |
149 | 
150 |
151 | 
152 |
153 | * You should now see the connection to your PostgreSQL Database in the `Database Navigator` view.
154 |
155 | 
156 |
157 | * You can now access your new (empty) database.
158 | * You can found the created user under `Roles`
159 |
160 | 
161 |
162 | ## Accessing the PostgreSQL instance with the pgAdmin Desktop client
163 |
164 | When you [download pgAdmin 4](https://www.pgadmin.org/download/), it comes with a desktop GUI written in Electron.
165 | Once **pgAdmin** is installed on your computer, it is under the subdirectory `runtime` with the name `pgAdmin4` or `pgAdmin4.exe` on Windows.
166 | Executing this file will start the **pgAdmin** web application and the Electron application.
167 | The whole application require a lot of ressources of your system and **DBeaver** is probably a more lightweigth solution.
168 | However, **pgAdmin** is a very complete and powerful solution to work with a PostgreSQL instance.
169 | Of course, rather than installing locally **pgAdmin** you could use the containerized version.
170 | As a matter of fact, do not install it both locally and in its containerized form.
171 |
172 | To configure **pgAdmin** :
173 |
174 | * Run the desktop application (`pgAdmin4` or `pgAdmin4.exe` on Windows)
175 | * When the application is started, on your first run, you should have something similar to the next screenshot
176 |
177 | 
178 |
179 | * You first need to register a new server by a right click on `Servers` in the `Object explorer`
180 |
181 | 
182 |
183 | * A popup window with several tabs should appear.
184 | * In the `General` tab you have to fill the `Name` field (this is the name you want to give to your PostgreSQL Instance, it can be whatever you want). You should also toggle on the `Connect now ?` button.
185 |
186 | 
187 |
188 | * In the `Connection` tab, you have to fill the `Host name/address` field with the value `localhost`, the `Port` field with the value `5432`, and the fields `Maintenance database`, `Username` and `Password` with respectively the values of the environment variables `POSTGRES_DB`, `POSTGRES_USER`, `POSTGRES_PASSWORD`.
189 |
190 | 
191 |
192 | * When you click on the `Save` button, pgAdmin should connect to the database server and it should appear in the `Object Explorer` panel.
193 |
194 | 
195 |
196 | ## Stopping the container
197 |
198 | To stop the container, type the following in your shell, from the directory which contains the docker compose file `dc-postgresql-complete.yml` :
199 |
200 | ```txt
201 | docker compose -f dc-postgresql-complete.yml down
202 | ```
203 |
204 | 
205 |
206 | ## Dedicated docker compose files
207 |
208 | ### Only PostgreSQL
209 |
210 | If you only need a **postgreSQL** instance you can use the docker compose file under `postgresql-docker-compose-examples/postgresql-only`.
211 | To fire up the container :
212 |
213 | ```txt
214 | docker compose -f dc-postgresql-only.yml up -d
215 | ```
216 | To stop it :
217 |
218 | ```txt
219 | docker compose -f dc-postgresql-only.yml down
220 | ```
221 |
222 | The configuration of the different tools is similar to what have been presented previously if need be.
223 | In this example the PostgreSQL instance database is not initialized with a table.
224 |
225 | 
226 |
227 | 
228 |
229 | 
230 |
231 | 
232 |
233 | ### PostgreSQL and pgAdmin
234 |
235 | If you only need a **postgreSQL** instance with **pgAdmin** you can use the docker compose file under `postgresql-docker-compose-examples/postgresql-pgadmin`.
236 | To fire up the container :
237 |
238 | ```txt
239 | docker compose -f dc-postgresql-pgadmin.yml up -d
240 | ```
241 | To stop it :
242 |
243 | ```txt
244 | docker compose -f dc-postgresql-pgadmin.yml down
245 | ```
246 |
247 | The configuration of **pgAdmin** is identical to the one explained previously.
248 |
249 | ### PostgreSQL and Metabase
250 |
251 | If you only need a **postgreSQL** instance with **Metabase** you can use the docker compose file under `postgresql-docker-compose-examples/postgresql-metabase`.
252 | To fire up the container :
253 |
254 | ```txt
255 | docker compose -f dc-postgresql-metabase.yml up -d
256 | ```
257 | To stop it :
258 |
259 | ```txt
260 | docker compose -f dc-postgresql-metabase.yml down
261 | ```
262 |
263 | The configuration of **Metabase** is identical to the one explained previously.
264 |
265 | ## Ressources
266 |
267 | * [Official PostgreSQL Site](https://www.postgresql.org/)
268 | * [Official Documentation](https://www.postgresql.org/docs/)
269 | * [Postgresql Logo](https://wiki.postgresql.org/wiki/Logo)
270 | * [PostgreSQL Official Image on Docker Hub](https://hub.docker.com/_/postgres)
271 | * [pgAdmin Official Image on Docker Hub](https://hub.docker.com/r/dpage/pgadmin4/)
272 | * [Metabase](https://www.metabase.com/)
273 | * [Running Metabase on Docker](https://www.metabase.com/docs/latest/installation-and-operation/running-metabase-on-docker)
274 | * [Metabase Official Image on Docker Hub](https://hub.docker.com/r/metabase/metabase)
275 | * [PostgreSQL Clients](https://wiki.postgresql.org/wiki/PostgreSQL_Clients)
276 | * [pgAdmin](https://www.pgadmin.org/)
277 | * [Documentation](https://www.pgadmin.org/docs/pgadmin4/latest/index.html)
278 | * [DBeaver Community](https://dbeaver.io/)
279 | * [pgmanage](https://github.com/commandprompt/pgmanage)
280 | * Documentation in French
281 | * [PostgreSQL documentation in French](https://docs.postgresql.fr/)
282 | * [Site of the French PostgreSQL community ](https://www.postgresql.fr/)
283 | * [Pre-seeding database with schema and data at startup for development environment](https://docs.docker.com/guides/pre-seeding/)
284 | * Baeldung tutorial if you just want to use Docker and not Docker Compose : [PostgreSQL with Docker Setup](https://www.baeldung.com/ops/postgresql-docker-setup)
285 | * Medium Post which explains how to initialize a PostgreSQL Database : [Initializing a PostgreSQL Database with a Dataset using Docker Compose: A Step-by-step Guide](https://medium.com/@asuarezaceves/initializing-a-postgresql-database-with-a-dataset-using-docker-compose-a-step-by-step-guide-3feebd5b1545)
286 | * The CSV File with the Pokemon data is from here : https://gist.github.com/armgilles/194bcff35001e7eb53a2a8b441e8b2c6
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/assets/directory-structure.mm:
--------------------------------------------------------------------------------
1 |
359 |
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/assets/docker-compose-file-postgresql-complete.odg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/assets/docker-compose-file-postgresql-complete.odg
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/assets/docker-compose-file-postgresql-only.odg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/assets/docker-compose-file-postgresql-only.odg
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/pics/PostgreSQL_logo.3colors.120x120.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/pics/PostgreSQL_logo.3colors.120x120.png
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/pics/PostgreSQL_logo.3colors.540x557.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/pics/PostgreSQL_logo.3colors.540x557.png
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/pics/access_pg_with_dbeaver_001.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/pics/access_pg_with_dbeaver_001.png
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/pics/access_pg_with_dbeaver_002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/pics/access_pg_with_dbeaver_002.png
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/pics/access_pg_with_dbeaver_003-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/pics/access_pg_with_dbeaver_003-1.png
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/pics/access_pg_with_dbeaver_003.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/pics/access_pg_with_dbeaver_003.png
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/pics/access_pg_with_dbeaver_004.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/pics/access_pg_with_dbeaver_004.png
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/pics/access_pg_with_dbeaver_005.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/pics/access_pg_with_dbeaver_005.png
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/pics/access_pg_with_dbeaver_006.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/pics/access_pg_with_dbeaver_006.png
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/pics/access_pg_with_dbeaver_007.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/pics/access_pg_with_dbeaver_007.png
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/pics/accessing_pg_instance_from_cli_in_container.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/pics/accessing_pg_instance_from_cli_in_container.png
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/pics/accessing_pg_with_metabase_001.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/pics/accessing_pg_with_metabase_001.png
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/pics/accessing_pg_with_metabase_002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/pics/accessing_pg_with_metabase_002.png
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/pics/accessing_pg_with_metabase_003.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/pics/accessing_pg_with_metabase_003.png
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/pics/accessing_pg_with_metabase_004.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/pics/accessing_pg_with_metabase_004.png
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/pics/accessing_pg_with_metabase_005.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/pics/accessing_pg_with_metabase_005.png
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/pics/accessing_pg_with_metabase_006.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/pics/accessing_pg_with_metabase_006.png
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/pics/accessing_pg_with_metabase_007.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/pics/accessing_pg_with_metabase_007.png
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/pics/accessing_pg_with_metabase_008.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/pics/accessing_pg_with_metabase_008.png
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/pics/accessing_pg_with_metabase_009.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/pics/accessing_pg_with_metabase_009.png
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/pics/dc-postgresql-complet-yml.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/pics/dc-postgresql-complet-yml.png
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/pics/dc-postgresql-single-yml.alternative.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/pics/dc-postgresql-single-yml.alternative.png
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/pics/dc-postgresql-single-yml.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/pics/dc-postgresql-single-yml.png
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/pics/directory-structure.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/pics/directory-structure.png
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/pics/docker-compose-file-postgresql-complete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/pics/docker-compose-file-postgresql-complete.png
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/pics/docker-compose-file-postgresql-only.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/pics/docker-compose-file-postgresql-only.jpg
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/pics/docker-compose-file-postgresql-only.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/pics/docker-compose-file-postgresql-only.png
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/pics/docker-compose-result-for-first-time-pull-image-pg-17.4-alpine.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/pics/docker-compose-result-for-first-time-pull-image-pg-17.4-alpine.png
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/pics/docker-compose-result-for-first-time-pull-image-pg-latest.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/pics/docker-compose-result-for-first-time-pull-image-pg-latest.png
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/pics/dot-env-file-for-postgres_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/pics/dot-env-file-for-postgres_1.png
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/pics/dot-env-file-for-postgres_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/pics/dot-env-file-for-postgres_2.png
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/pics/first_connexion_to_pgadmin_web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/pics/first_connexion_to_pgadmin_web.png
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/pics/initdb.d-directory.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/pics/initdb.d-directory.png
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/pics/pgAdmin_001.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/pics/pgAdmin_001.png
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/pics/pgAdmin_002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/pics/pgAdmin_002.png
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/pics/pgAdmin_003.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/pics/pgAdmin_003.png
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/pics/pgAdmin_004.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/pics/pgAdmin_004.png
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/pics/pgAdmin_005.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/pics/pgAdmin_005.png
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/pics/pgadmin-web-001.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/pics/pgadmin-web-001.png
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/pics/pgadmin-web-002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/pics/pgadmin-web-002.png
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/pics/pgadmin-web-003.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/pics/pgadmin-web-003.png
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/pics/pgadmin-web-004.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/pics/pgadmin-web-004.png
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/pics/pgadmin-web-005.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/pics/pgadmin-web-005.png
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/pics/postgres-and-pgadmin-first-pull.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/pics/postgres-and-pgadmin-first-pull.png
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/pics/postgres-pgadmin-and-metabase-containers-running-in-rancher-desktop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/pics/postgres-pgadmin-and-metabase-containers-running-in-rancher-desktop.png
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/pics/postgres-pgadmin-and-metabase-first-pull.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/pics/postgres-pgadmin-and-metabase-first-pull.png
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/pics/postgresql-original-wordmark.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/pics/postgresql-plain-wordmark.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/pics/postgresql.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/pics/rancher-desktop-after-pull-image-pg-17.4-alpine.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/pics/rancher-desktop-after-pull-image-pg-17.4-alpine.png
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/pics/rancher-desktop-after-pull-image-pg-latest.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/pics/rancher-desktop-after-pull-image-pg-latest.png
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/pics/stopping-the-containers-with-docker-compose.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/pics/stopping-the-containers-with-docker-compose.png
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/pics/stopping-the-pg-container-with-docker-compose.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/pics/stopping-the-pg-container-with-docker-compose.png
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/postgresql-complete/.env:
--------------------------------------------------------------------------------
1 | # Postgresql Environment Variables
2 | POSTGRES_DB=mydb
3 | POSTGRES_USER=mydb
4 | POSTGRES_PASSWORD=p@ssw0rd
5 | # pgAdmin Environment Variables
6 | PGADMIN_DEFAULT_EMAIL=dummyemail@dummy.org # Dummy email but correctly form
7 | PGADMIN_DEFAULT_PASSWORD=d3fault_p@ssw0rd
8 | PGADMIN_LISTEN_ADDRESS=[::] # Default value
9 | PPGADMIN_LISTEN_PORT=80 # Default value when TLS disabled
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/postgresql-complete/dc-postgresql-complete.yml:
--------------------------------------------------------------------------------
1 | services:
2 | postgres:
3 | # see https://hub.docker.com/_/postgres for list of postgres image versions on docker hub
4 | #image: postgres:latest # To download the latest image
5 | #image: postgres:17.4-alpine # To download a specific version, here the version 17.4 of Postgresql under an alpine linux distribution
6 | image: postgres:17.4 # To download a specific version, here the version 17.4 of Postgresql
7 | container_name: postgres
8 | volumes:
9 | - postgresql_data:/var/lib/postgresql/data
10 | - ./initdb.d:/docker-entrypoint-initdb.d
11 | env_file:
12 | - .env
13 | environment:
14 | POSTGRES_DB: ${POSTGRES_DB}
15 | POSTGRES_USER: ${POSTGRES_USER}
16 | POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
17 | ports:
18 | - "5432:5432" # HOST_PORT:CONTAINER_PORT
19 | networks:
20 | - postgres_network
21 | pgadmin:
22 | # see https://hub.docker.com/r/dpage/pgadmin4
23 | image: dpage/pgadmin4:latest # To download the latest image
24 | container_name: pgadmin
25 | volumes:
26 | - pgadmin_working_dir:/var/lib/pgadmin
27 | - pgadmin_config_dir:/pgadmin4
28 | env_file:
29 | - .env
30 | environment:
31 | PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL}
32 | POSTGRES_USER: ${POSTGRES_USER}
33 | POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
34 | depends_on:
35 | - postgres
36 | ports:
37 | - "5433:80" # HOST_PORT:CONTAINER_PORT
38 | networks:
39 | - postgres_network
40 | metabase:
41 | # see https://hub.docker.com/r/metabase/metabase and https://www.metabase.com/docs/latest/installation-and-operation/running-metabase-on-docker
42 | image: metabase/metabase:latest # To download the latest image
43 | container_name: metabase
44 | depends_on:
45 | - postgres
46 | ports:
47 | - "5434:3000" # HOST_PORT:CONTAINER_PORT
48 | networks:
49 | - postgres_network
50 |
51 | volumes:
52 | postgresql_data:
53 | driver: local
54 | pgadmin_working_dir:
55 | driver: local
56 | pgadmin_config_dir:
57 | driver: local
58 |
59 | networks:
60 | postgres_network:
61 | driver: bridge
62 |
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/postgresql-complete/initdb.d/init.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE pokemon (
2 | num INT,
3 | name TEXT,
4 | type1 TEXT,
5 | type2 TEXT,
6 | total INT,
7 | hp INT,
8 | attack INT,
9 | defense INT,
10 | special_attack INT,
11 | special_defense INT,
12 | speed INT,
13 | generation INT,
14 | legendary BOOLEAN
15 | );
16 |
17 | COPY pokemon
18 | FROM '/docker-entrypoint-initdb.d/pokemon.csv'
19 | DELIMITER ','
20 | CSV HEADER;
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/postgresql-complete/pgadmin_config_dir/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/postgresql-complete/pgadmin_config_dir/.gitkeep
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/postgresql-complete/pgadmin_working_dir/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/postgresql-complete/pgadmin_working_dir/.gitkeep
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/postgresql-complete/postgresql_data/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/postgresql-complete/postgresql_data/.gitkeep
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/postgresql-metabase/.env:
--------------------------------------------------------------------------------
1 | # Postgresql Environment Variables
2 | POSTGRES_DB=mydb
3 | POSTGRES_USER=mydb
4 | POSTGRES_PASSWORD=p@ssw0rd
5 |
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/postgresql-metabase/dc-postgresql-metabase.yml:
--------------------------------------------------------------------------------
1 | services:
2 | postgres:
3 | # see https://hub.docker.com/_/postgres for list of postgres image versions on docker hub
4 | #image: postgres:latest # To download the latest image
5 | #image: postgres:17.4-alpine # To download a specific version, here the version 17.4 of Postgresql under an alpine linux distribution
6 | image: postgres:17.4 # To download a specific version, here the version 17.4 of Postgresql
7 | container_name: postgres
8 | volumes:
9 | - postgresql_data:/var/lib/postgresql/data
10 | - ./initdb.d:/docker-entrypoint-initdb.d
11 | env_file:
12 | - .env
13 | environment:
14 | POSTGRES_DB: ${POSTGRES_DB}
15 | POSTGRES_USER: ${POSTGRES_USER}
16 | POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
17 | ports:
18 | - "5432:5432" # HOST_PORT:CONTAINER_PORT
19 | networks:
20 | - postgres_network
21 | metabase:
22 | # see https://hub.docker.com/r/metabase/metabase and https://www.metabase.com/docs/latest/installation-and-operation/running-metabase-on-docker
23 | image: metabase/metabase:latest # To download the latest image
24 | container_name: metabase
25 | depends_on:
26 | - postgres
27 | ports:
28 | - "5434:3000" # HOST_PORT:CONTAINER_PORT
29 | networks:
30 | - postgres_network
31 |
32 | volumes:
33 | postgresql_data:
34 | driver: local
35 |
36 | networks:
37 | postgres_network:
38 | driver: bridge
39 |
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/postgresql-metabase/initdb.d/init.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE pokemon (
2 | num INT,
3 | name TEXT,
4 | type1 TEXT,
5 | type2 TEXT,
6 | total INT,
7 | hp INT,
8 | attack INT,
9 | defense INT,
10 | special_attack INT,
11 | special_defense INT,
12 | speed INT,
13 | generation INT,
14 | legendary BOOLEAN
15 | );
16 |
17 | COPY pokemon
18 | FROM '/docker-entrypoint-initdb.d/pokemon.csv'
19 | DELIMITER ','
20 | CSV HEADER;
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/postgresql-metabase/postgresql_data/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/postgresql-metabase/postgresql_data/.gitkeep
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/postgresql-only/.env:
--------------------------------------------------------------------------------
1 | # Postgresql Environment Variables
2 | POSTGRES_DB=mydb
3 | POSTGRES_USER=mydb
4 | POSTGRES_PASSWORD=p@ssw0rd
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/postgresql-only/dc-postgresql-only.yml:
--------------------------------------------------------------------------------
1 | services:
2 | postgres:
3 | # see https://hub.docker.com/_/postgres for list of postgres image versions on docker hub
4 | #image: postgres:latest # To download the latest image
5 | #image: postgres:17.4-alpine # To download a specific version, here the version 17.4 of Postgresql under an alpine linux distribution
6 | image: postgres:17.4 # To download a specific version, here the version 17.4 of Postgresql
7 | container_name: postgres
8 | volumes:
9 | - postgresql_data:/var/lib/postgresql/data
10 | env_file:
11 | - .env
12 | environment:
13 | POSTGRES_DB: ${POSTGRES_DB}
14 | POSTGRES_USER: ${POSTGRES_USER}
15 | POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
16 | ports:
17 | - "5432:5432" # HOST_PORT:CONTAINER_PORT
18 | networks:
19 | - postgres_network
20 |
21 | volumes:
22 | postgresql_data:
23 | driver: local
24 |
25 | networks:
26 | postgres_network:
27 | driver: bridge
28 |
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/postgresql-only/postgresql_data/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/postgresql-only/postgresql_data/.gitkeep
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/postgresql-pgadmin/.env:
--------------------------------------------------------------------------------
1 | # Postgresql Environment Variables
2 | POSTGRES_DB=mydb
3 | POSTGRES_USER=mydb
4 | POSTGRES_PASSWORD=p@ssw0rd
5 | # pgAdmin Environment Variables
6 | PGADMIN_DEFAULT_EMAIL=dummyemail@dummy.org # Dummy email but correctly form
7 | PGADMIN_DEFAULT_PASSWORD=d3fault_p@ssw0rd
8 | PGADMIN_LISTEN_ADDRESS=[::] # Default value
9 | PPGADMIN_LISTEN_PORT=80 # Default value when TLS disabled
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/postgresql-pgadmin/dc-postgresql-pgadmin.yml:
--------------------------------------------------------------------------------
1 | services:
2 | postgres:
3 | # see https://hub.docker.com/_/postgres for list of postgres image versions on docker hub
4 | #image: postgres:latest # To download the latest image
5 | #image: postgres:17.4-alpine # To download a specific version, here the version 17.4 of Postgresql under an alpine linux distribution
6 | image: postgres:17.4 # To download a specific version, here the version 17.4 of Postgresql
7 | container_name: postgres
8 | volumes:
9 | - postgresql_data:/var/lib/postgresql/data
10 | - ./initdb.d:/docker-entrypoint-initdb.d
11 | env_file:
12 | - .env
13 | environment:
14 | POSTGRES_DB: ${POSTGRES_DB}
15 | POSTGRES_USER: ${POSTGRES_USER}
16 | POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
17 | ports:
18 | - "5432:5432" # HOST_PORT:CONTAINER_PORT
19 | networks:
20 | - postgres_network
21 | pgadmin:
22 | # see https://hub.docker.com/r/dpage/pgadmin4
23 | image: dpage/pgadmin4:latest # To download the latest image
24 | container_name: pgadmin
25 | volumes:
26 | - pgadmin_working_dir:/var/lib/pgadmin
27 | - pgadmin_config_dir:/pgadmin4
28 | env_file:
29 | - .env
30 | environment:
31 | PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL}
32 | POSTGRES_USER: ${POSTGRES_USER}
33 | POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
34 | depends_on:
35 | - postgres
36 | ports:
37 | - "5433:80" # HOST_PORT:CONTAINER_PORT
38 | networks:
39 | - postgres_network
40 |
41 | volumes:
42 | postgresql_data:
43 | driver: local
44 | pgadmin_working_dir:
45 | driver: local
46 | pgadmin_config_dir:
47 | driver: local
48 |
49 | networks:
50 | postgres_network:
51 | driver: bridge
52 |
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/postgresql-pgadmin/initdb.d/init.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE pokemon (
2 | num INT,
3 | name TEXT,
4 | type1 TEXT,
5 | type2 TEXT,
6 | total INT,
7 | hp INT,
8 | attack INT,
9 | defense INT,
10 | special_attack INT,
11 | special_defense INT,
12 | speed INT,
13 | generation INT,
14 | legendary BOOLEAN
15 | );
16 |
17 | COPY pokemon
18 | FROM '/docker-entrypoint-initdb.d/pokemon.csv'
19 | DELIMITER ','
20 | CSV HEADER;
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/postgresql-pgadmin/pgadmin_working_dir/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/postgresql-pgadmin/pgadmin_working_dir/.gitkeep
--------------------------------------------------------------------------------
/postgresql-docker-compose-examples/postgresql-pgadmin/postgresql_data/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/postgresql-docker-compose-examples/postgresql-pgadmin/postgresql_data/.gitkeep
--------------------------------------------------------------------------------
/redis-docker-compose-examples/README.md:
--------------------------------------------------------------------------------
1 | # Redis
2 |
3 | ## Mode mono-instance
4 |
5 | ### Lancement du conteneur avec l'instance Redis
6 |
7 | ```shell
8 | docker compose -f dc-redis-single.yml up -d
9 | ```
10 |
11 | ### Arrêt du conteneur
12 |
13 | ```shell
14 | docker compose -f dc-redis-single.yml down
15 | ```
16 |
17 | ## Mode cluster
18 |
19 | ### Lancement du conteneur avec les instances pour le cluster Redis
20 |
21 | ```shell
22 | docker compose -f dc-redis-cluster.yml up -d
23 | ```
24 |
25 | ### Création du cluster
26 |
27 | Ouverture d'un _shell_ sur l'une des instances crées dans l'invite de commande via `docker exec -it redis-1 sh` ou en ouvrant un shell sur sur **Docker Desktop**, par exemple sur l'instance `redis-1`.
28 |
29 | 
30 |
31 | Puis création du cluster avec le client Redis en ligne de commande : `redis-cli --cluster create redis-1:6379 redis-2:6380 redis-3:6381 redis-4:6382 redis-5:6383 redis-6:6384 --cluster-replicas 1`
32 |
33 | 
34 |
35 | ### Arrêt du cluster
36 |
37 | ```shell
38 | docker compose -f dc-redis-cluster.yml down
39 | ```
40 |
41 | ### CLI
42 |
43 | ```shell
44 | docker run -it --network some-network --rm redis redis-cli -h some-redis
45 | ```
46 |
47 | `docker exec -it postgres /bin/sh`
48 |
49 | * `docker exec -it redis /bin/sh`
50 | * `redis-cli`
51 | * `quit` to exit `redis-cli`
52 | * `exit` to exit the shell
53 |
54 | ## Clients lourds
55 |
56 | ### RedisInsight
57 |
58 | * [Site Officiel](https://redis.io/insight/)
59 |
60 | ### Another Redis Desktop Manager
61 |
62 | * [Site Officiel](https://goanother.com/)
63 | * [GitHub](https://github.com/qishibo/AnotherRedisDesktopManager)
64 | * [Téléchargement des binaires sur GitHub](https://github.com/qishibo/AnotherRedisDesktopManager/releases)
65 |
66 | ### Plugin Redis for Visual Studio Code
67 |
68 | ## WSL
69 |
70 | ### Pour le mode single
71 |
72 | Lors d'un lancement depuis WSL, pour pouvoir accéder aux ports de Redis depuis windows il faut lancer le script suivant :
73 |
74 | ```powershell
75 | $wslIp=(wsl -d Ubuntu -e sh -c "ip addr show eth0 | grep 'inet\b' | awk '{print `$2}' | cut -d/ -f1") # Get the private IP of the WSL2 instance
76 |
77 | netsh interface portproxy delete v4tov4 listenport="6379" # Delete any existing port 6379 forwarding
78 | netsh interface portproxy add v4tov4 listenport="6379" connectaddress="$wslIp" connectport="6379"
79 | ```
80 |
81 | ### Pour le mode cluster
82 |
83 | ```powershell
84 | $wslIp=(wsl -d Ubuntu -e sh -c "ip addr show eth0 | grep 'inet\b' | awk '{print `$2}' | cut -d/ -f1") # Get the private IP of the WSL2 instance
85 |
86 | netsh interface portproxy delete v4tov4 listenport="6379" # Delete any existing port 6379 forwarding
87 | netsh interface portproxy add v4tov4 listenport="6379" connectaddress="$wslIp" connectport="6379"
88 |
89 | netsh interface portproxy delete v4tov4 listenport="6380" # Delete any existing port 6380 forwarding
90 | netsh interface portproxy add v4tov4 listenport="6380" connectaddress="$wslIp" connectport="6380"
91 |
92 | netsh interface portproxy delete v4tov4 listenport="6381" # Delete any existing port 6381 forwarding
93 | netsh interface portproxy add v4tov4 listenport="6381" connectaddress="$wslIp" connectport="6381"
94 |
95 | netsh interface portproxy delete v4tov4 listenport="6382" # Delete any existing port 6382 forwarding
96 | netsh interface portproxy add v4tov4 listenport="6382" connectaddress="$wslIp" connectport="6382"
97 |
98 | netsh interface portproxy delete v4tov4 listenport="6383" # Delete any existing port 6383 forwarding
99 | netsh interface portproxy add v4tov4 listenport="6383" connectaddress="$wslIp" connectport="6383"
100 |
101 | netsh interface portproxy delete v4tov4 listenport="6384" # Delete any existing port 6384 forwarding
102 | netsh interface portproxy add v4tov4 listenport="6384" connectaddress="$wslIp" connectport="6384"
103 | ```
104 |
105 | ## Ressources
106 |
107 | * Site officielle de Redis
108 | * [Redis configuration file example](https://redis.io/docs/latest/operate/oss_and_stack/management/config-file/)
109 | * [Configuration file for Redis 7.4.3](https://raw.githubusercontent.com/redis/redis/unstable/redis.conf)
110 | * [Redis Insight configuration settings](https://redis.io/docs/latest/operate/redisinsight/configuration/)
111 | * [Creating Redis Cluster using Docker](https://medium.com/commencis/creating-redis-cluster-using-docker-67f65545796d)
112 | * [Scaling with Redis Cluster](https://redis.io/docs/manual/scaling/)
113 | * [Redis cluster specification](https://redis.io/docs/reference/cluster-spec/)
114 | * [docker-redis-cluster](https://github.com/Grokzen/docker-redis-cluster)
115 | * [How to Setup & Configure a Redis Cluster Easily](https://www.dltlabs.com/blog/how-to-setup-configure-a-redis-cluster-easily-573120)
116 | * [Image Docker Officielle de Redis](https://hub.docker.com/_/redis)
117 | * [How to Use the Redis Docker Official Image](https://www.docker.com/blog/how-to-use-the-redis-docker-official-image/)
118 | * [Image Docker Officielle de Redis Insight](https://hub.docker.com/r/redis/redisinsight)
119 | * [Another Redis Desktop Manager](https://goanother.com/)
120 | * [GitHub](https://github.com/qishibo/AnotherRedisDesktopManager)
121 | * [Releases](https://github.com/qishibo/AnotherRedisDesktopManager/releases)
122 | * Docker Networking
123 | * [Networking overview](https://docs.docker.com/engine/network/)
124 | * [Network drivers](https://docs.docker.com/engine/network/drivers/)
125 | * [Les réseaux dans docker-compose.yml](https://www.nicelydev.com/docker/reseau-docker-compose)
126 | * [Networking With Docker Compose (Quick Guide)](https://www.netmaker.io/resources/docker-compose-network)
127 | * [Networking in Compose](https://docs.docker.com/compose/how-tos/networking/)
128 | * [Services top-level elements](https://docs.docker.com/reference/compose-file/services/)
129 |
--------------------------------------------------------------------------------
/redis-docker-compose-examples/README_FR.md:
--------------------------------------------------------------------------------
1 | # Redis
2 |
3 | ## Mode mono-instance
4 |
5 | ### Lancement du conteneur avec l'instance Redis
6 |
7 | ```shell
8 | docker compose -f dc-redis-single.yml up -d
9 | ```
10 |
11 | ### Arrêt du conteneur
12 |
13 | ```shell
14 | docker compose -f dc-redis-single.yml down
15 | ```
16 |
17 | ## Mode cluster
18 |
19 | ### Lancement du conteneur avec les instances pour le cluster Redis
20 |
21 | ```shell
22 | docker compose -f dc-redis-cluster.yml up -d
23 | ```
24 |
25 | ### Création du cluster
26 |
27 | Ouverture d'un _shell_ sur l'une des instances crées dans l'invite de commande via `docker exec -it redis-1 sh` ou en ouvrant un shell sur sur **Docker Desktop**, par exemple sur l'instance `redis-1`.
28 |
29 | 
30 |
31 | Puis création du cluster avec le client Redis en ligne de commande : `redis-cli --cluster create redis-1:6379 redis-2:6380 redis-3:6381 redis-4:6382 redis-5:6383 redis-6:6384 --cluster-replicas 1`
32 |
33 | 
34 |
35 | ### Arrêt du cluster
36 |
37 | ```shell
38 | docker compose -f dc-redis-cluster.yml down
39 | ```
40 |
41 | ### CLI
42 |
43 | ```shell
44 | docker run -it --network some-network --rm redis redis-cli -h some-redis
45 | ```
46 |
47 | `docker exec -it postgres /bin/sh`
48 |
49 | * `docker exec -it redis /bin/sh`
50 | * `redis-cli`
51 | * `quit` to exit `redis-cli`
52 | * `exit` to exit the shell
53 |
54 | ## Clients lourds
55 |
56 | ### RedisInsight
57 |
58 | * [Site Officiel](https://redis.io/insight/)
59 |
60 | ### Another Redis Desktop Manager
61 |
62 | * [Site Officiel](https://goanother.com/)
63 | * [GitHub](https://github.com/qishibo/AnotherRedisDesktopManager)
64 | * [Téléchargement des binaires sur GitHub](https://github.com/qishibo/AnotherRedisDesktopManager/releases)
65 |
66 | ### Plugin Redis for Visual Studio Code
67 |
68 | ## WSL
69 |
70 | ### Pour le mode single
71 |
72 | Lors d'un lancement depuis WSL, pour pouvoir accéder aux ports de Redis depuis windows il faut lancer le script suivant :
73 |
74 | ```powershell
75 | $wslIp=(wsl -d Ubuntu -e sh -c "ip addr show eth0 | grep 'inet\b' | awk '{print `$2}' | cut -d/ -f1") # Get the private IP of the WSL2 instance
76 |
77 | netsh interface portproxy delete v4tov4 listenport="6379" # Delete any existing port 6379 forwarding
78 | netsh interface portproxy add v4tov4 listenport="6379" connectaddress="$wslIp" connectport="6379"
79 | ```
80 |
81 | ### Pour le mode cluster
82 |
83 | ```powershell
84 | $wslIp=(wsl -d Ubuntu -e sh -c "ip addr show eth0 | grep 'inet\b' | awk '{print `$2}' | cut -d/ -f1") # Get the private IP of the WSL2 instance
85 |
86 | netsh interface portproxy delete v4tov4 listenport="6379" # Delete any existing port 6379 forwarding
87 | netsh interface portproxy add v4tov4 listenport="6379" connectaddress="$wslIp" connectport="6379"
88 |
89 | netsh interface portproxy delete v4tov4 listenport="6380" # Delete any existing port 6380 forwarding
90 | netsh interface portproxy add v4tov4 listenport="6380" connectaddress="$wslIp" connectport="6380"
91 |
92 | netsh interface portproxy delete v4tov4 listenport="6381" # Delete any existing port 6381 forwarding
93 | netsh interface portproxy add v4tov4 listenport="6381" connectaddress="$wslIp" connectport="6381"
94 |
95 | netsh interface portproxy delete v4tov4 listenport="6382" # Delete any existing port 6382 forwarding
96 | netsh interface portproxy add v4tov4 listenport="6382" connectaddress="$wslIp" connectport="6382"
97 |
98 | netsh interface portproxy delete v4tov4 listenport="6383" # Delete any existing port 6383 forwarding
99 | netsh interface portproxy add v4tov4 listenport="6383" connectaddress="$wslIp" connectport="6383"
100 |
101 | netsh interface portproxy delete v4tov4 listenport="6384" # Delete any existing port 6384 forwarding
102 | netsh interface portproxy add v4tov4 listenport="6384" connectaddress="$wslIp" connectport="6384"
103 | ```
104 |
105 | ## Ressources
106 |
107 | * Site officielle de Redis
108 | * [Redis configuration file example](https://redis.io/docs/latest/operate/oss_and_stack/management/config-file/)
109 | * [Configuration file for Redis 7.4.3](https://raw.githubusercontent.com/redis/redis/unstable/redis.conf)
110 | * [Redis Insight configuration settings](https://redis.io/docs/latest/operate/redisinsight/configuration/)
111 | * [Scaling with Redis Cluster](https://redis.io/docs/manual/scaling/)
112 | * > To make Docker compatible with Redis Cluster, you need to use Docker's host networking mode. Please see the --net=host option in the [Docker documentation](https://docs.docker.com/engine/userguide/networking/dockernetworks/) for more information.
113 | * [Redis cluster specification](https://redis.io/docs/reference/cluster-spec/)
114 | * [docker-redis-cluster](https://github.com/Grokzen/docker-redis-cluster)
115 | * [Image Docker Officielle de Redis](https://hub.docker.com/_/redis)
116 | * [How to Use the Redis Docker Official Image](https://www.docker.com/blog/how-to-use-the-redis-docker-official-image/)
117 | * [Image Docker Officielle de Redis Insight](https://hub.docker.com/r/redis/redisinsight)
118 | * [Another Redis Desktop Manager](https://goanother.com/)
119 | * [GitHub](https://github.com/qishibo/AnotherRedisDesktopManager)
120 | * [Releases](https://github.com/qishibo/AnotherRedisDesktopManager/releases)
121 | * Docker Networking
122 | * [Networking overview](https://docs.docker.com/engine/network/)
123 | * [Network drivers](https://docs.docker.com/engine/network/drivers/)
124 | * [Les réseaux dans docker-compose.yml](https://www.nicelydev.com/docker/reseau-docker-compose)
125 | * [Networking With Docker Compose (Quick Guide)](https://www.netmaker.io/resources/docker-compose-network)
126 | * [Networking in Compose](https://docs.docker.com/compose/how-tos/networking/)
127 | * [Services top-level elements](https://docs.docker.com/reference/compose-file/services/)
128 |
129 | ### Outdated ressources
130 |
131 | * [Creating Redis Cluster using Docker](https://medium.com/commencis/creating-redis-cluster-using-docker-67f65545796d)
132 |
--------------------------------------------------------------------------------
/redis-docker-compose-examples/assets/directory-structure.mm:
--------------------------------------------------------------------------------
1 |
176 |
--------------------------------------------------------------------------------
/redis-docker-compose-examples/assets/docker-compose-file-redis.odg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/redis-docker-compose-examples/assets/docker-compose-file-redis.odg
--------------------------------------------------------------------------------
/redis-docker-compose-examples/cheatsheet/aide-memoire-commandes-redis.md:
--------------------------------------------------------------------------------
1 | # Introduction aux commandes Redis pour manipuler des données
2 |
3 | Ce document est une introduction rapide à quelques unes des commandes Redis pour accéder et manipuler des données sous Redis.
4 |
5 | C'est plus un aide-mémoire basique qu'un véritable tutorial.
6 | L'objet est d'aider à utiliser rapidement Redis lorsqu'on a besoin de faire des requêtes depuis la ligne de commande ou depuis un outil comme [Another Redis Desktop Manager](https://goanother.com/) ou [RedisInsight](https://redis.com/fr/redis-enterprise/redisinsight).
7 |
8 | L'ensemble des commandes de Redis est documenté sur le site officiel : [https://redis.io/commands](https://redis.io/commands).
9 |
10 | ## Présentation générale
11 |
12 | Les données dans Redis sont enregistrées en utilisant des clés (_keys_).
13 | Les clés sont le plus souvent des chaînes de caractères mais ce n'est pas une obligation.
14 | La valeur associée à cette clé peut être de différents types : une simple chaîne de caractères (`STRING`), une liste (`LIST`), un ensemble (`SET`), un tableau associatif (`HASH`), un ensemble trié (`SORTED SET`) ou un [`HyperLogLog`](https://fr.wikipedia.org/wiki/HyperLogLog).
15 |
16 | ## Commandes sur les clés
17 |
18 | ### Récupération de toutes les clés présentes dans la base
19 |
20 | Pour récupérer toutes les clés présentes dans la base Redis correspondant à un certain motif, on peut utiliser la commande `KEYS pattern`.
21 |
22 | `pattern` peut avoir la valeur `*` pour récupérer les clés correspondant à n'importe quel motif : `KEYS *`.
23 |
24 | **TODO : exemples sous forme de code et copies d'écran associés**
25 |
26 | ### Connaître le type de données associées à une clé
27 |
28 | Commande `TYPE `.
29 |
30 | **TODO : exemples sous forme de code et copies d'écran associés**
31 |
32 | ### Présence d'une clé dans la base
33 |
34 | Commande `EXISTS key`.
35 |
36 | **TODO : exemples sous forme de code et copies d'écran associés**
37 |
38 | ### Supprimer une clé et les données qui lui sont associées
39 |
40 | Commande `DEL key`.
41 |
42 | **TODO : exemples sous forme de code et copies d'écran associés**
43 |
44 | On notera que lorsque Redis arrive à effectuer la suppression, il retourne le nombre de clés qu'il a supprimé.
45 | En effet on peut passer à `DEL` plusieurs clés à supprimer.
46 |
47 | **TODO : exemples sous forme de code et copies d'écran associés**
48 |
49 | ## Commandes sur les ensembles
50 |
51 | ### Lister les éléments d'un ensemble
52 |
53 | Les _ensembles_ correspondent à la structure de données (`SET`).
54 |
55 | Pour avoir la liste des éléments d'un ensemble la commande est `SMEMBERS nom_ensemble`.
56 |
57 | **TODO : exemples sous forme de code et copies d'écran associés**
58 |
59 | ### Vérifier si une valeur est dans un ensemble
60 |
61 | Pour tester si une valeur est présente dans un ensemble (`SET`), la commande est `SISMEMBER nom_ensemble valeur`.
62 |
63 | **TODO : exemples sous forme de code et copies d'écran associés**
64 |
65 | Si l'élément est dans l'ensemble la valeur retournée est 1, s'il est absent la valeur retournée est 0.
66 |
67 | **TODO : exemples sous forme de code et copies d'écran associés**
68 |
69 | ## Commandes sur les tableaux associatifs
70 |
71 | Les _tableaux associatifs_ correspondent à la structure de données (`HASH`).
72 |
73 | ### Récupérer tous les champs dans un tableau associatif
74 |
75 | Commande `HKEYS key`
76 |
77 | **TODO : exemples sous forme de code et copies d'écran associés**
78 |
79 | ### Récupérer la valeur associé à un champ dans un tableau associatif
80 |
81 | Commande `HGET key field`
82 |
83 | **TODO : à étoffer avec plusde commandes, des exemples sous forme de code et des copies d'écran associés**
84 |
85 | ## Commandes sur les listes
86 |
87 | Les _tableaux associatifs_ correspondent à la structure de données (`LIST`).
88 |
89 | **TODO : à étoffer avec plusde commandes, des exemples sous forme de code et des copies d'écran associés**
90 |
91 | ## Commandes sur les chaines de caractères
92 |
93 | Les _tableaux associatifs_ correspondent à la structure de données (`STRING`).
94 |
95 | ### Récupération de la valeur associée à une clé de type String
96 |
97 | Commande `GET key`.
98 |
99 | **TODO : à étoffer avec plusde commandes, des exemples sous forme de code et des copies d'écran associés**
100 |
101 | ## Ressources
102 |
103 | ### RedisInsight
104 |
105 | * [Site Officiel](https://redis.com/fr/redis-enterprise/redisinsight)
106 |
107 | ### Another Redis Desktop Manager
108 |
109 | * [Site Officiel](https://goanother.com/)
110 | * [GitHub](https://github.com/qishibo/AnotherRedisDesktopManager)
111 | * [Téléchargement des binaires sur GitHub](https://github.com/qishibo/AnotherRedisDesktopManager/releases)
--------------------------------------------------------------------------------
/redis-docker-compose-examples/cheatsheet/redis-commands-cheat-sheet.md:
--------------------------------------------------------------------------------
1 | # Introduction aux commandes Redis pour manipuler des données
2 |
3 | Ce document est une introduction rapide à quelques unes des commandes Redis pour accéder et manipuler des données sous Redis.
4 |
5 | C'est plus un aide-mémoire basique qu'un véritable tutorial.
6 | L'objet est d'aider à utiliser rapidement Redis lorsqu'on a besoin de faire des requêtes depuis la ligne de commande ou depuis un outil comme [Another Redis Desktop Manager](https://goanother.com/) ou [RedisInsight](https://redis.com/fr/redis-enterprise/redisinsight).
7 |
8 | L'ensemble des commandes de Redis est documenté sur le site officiel : [https://redis.io/commands](https://redis.io/commands).
9 |
10 | ## Présentation générale
11 |
12 | Les données dans Redis sont enregistrées en utilisant des clés (_keys_).
13 | Les clés sont le plus souvent des chaînes de caractères mais ce n'est pas une obligation.
14 | La valeur associée à cette clé peut être de différents types : une simple chaîne de caractères (`STRING`), une liste (`LIST`), un ensemble (`SET`), un tableau associatif (`HASH`), un ensemble trié (`SORTED SET`) ou un [`HyperLogLog`](https://fr.wikipedia.org/wiki/HyperLogLog).
15 |
16 | ## Commandes sur les clés
17 |
18 | ### Récupération de toutes les clés présentes dans la base
19 |
20 | Pour récupérer toutes les clés présentes dans la base Redis correspondant à un certain motif, on peut utiliser la commande `KEYS pattern`.
21 |
22 | `pattern` peut avoir la valeur `*` pour récupérer les clés correspondant à n'importe quel motif : `KEYS *`.
23 |
24 | **TODO : exemples sous forme de code et copies d'écran associés**
25 |
26 | ### Connaître le type de données associées à une clé
27 |
28 | Commande `TYPE `.
29 |
30 | **TODO : exemples sous forme de code et copies d'écran associés**
31 |
32 | ### Présence d'une clé dans la base
33 |
34 | Commande `EXISTS key`.
35 |
36 | **TODO : exemples sous forme de code et copies d'écran associés**
37 |
38 | ### Supprimer une clé et les données qui lui sont associées
39 |
40 | Commande `DEL key`.
41 |
42 | **TODO : exemples sous forme de code et copies d'écran associés**
43 |
44 | On notera que lorsque Redis arrive à effectuer la suppression, il retourne le nombre de clés qu'il a supprimé.
45 | En effet on peut passer à `DEL` plusieurs clés à supprimer.
46 |
47 | **TODO : exemples sous forme de code et copies d'écran associés**
48 |
49 | ## Commandes sur les ensembles
50 |
51 | ### Lister les éléments d'un ensemble
52 |
53 | Les _ensembles_ correspondent à la structure de données (`SET`).
54 |
55 | Pour avoir la liste des éléments d'un ensemble la commande est `SMEMBERS nom_ensemble`.
56 |
57 | **TODO : exemples sous forme de code et copies d'écran associés**
58 |
59 | ### Vérifier si une valeur est dans un ensemble
60 |
61 | Pour tester si une valeur est présente dans un ensemble (`SET`), la commande est `SISMEMBER nom_ensemble valeur`.
62 |
63 | **TODO : exemples sous forme de code et copies d'écran associés**
64 |
65 | Si l'élément est dans l'ensemble la valeur retournée est 1, s'il est absent la valeur retournée est 0.
66 |
67 | **TODO : exemples sous forme de code et copies d'écran associés**
68 |
69 | ## Commandes sur les tableaux associatifs
70 |
71 | Les _tableaux associatifs_ correspondent à la structure de données (`HASH`).
72 |
73 | ### Récupérer tous les champs dans un tableau associatif
74 |
75 | Commande `HKEYS key`
76 |
77 | **TODO : exemples sous forme de code et copies d'écran associés**
78 |
79 | ### Récupérer la valeur associé à un champ dans un tableau associatif
80 |
81 | Commande `HGET key field`
82 |
83 | **TODO : à étoffer avec plusde commandes, des exemples sous forme de code et des copies d'écran associés**
84 |
85 | ## Commandes sur les listes
86 |
87 | Les _tableaux associatifs_ correspondent à la structure de données (`LIST`).
88 |
89 | **TODO : à étoffer avec plusde commandes, des exemples sous forme de code et des copies d'écran associés**
90 |
91 | ## Commandes sur les chaines de caractères
92 |
93 | Les _tableaux associatifs_ correspondent à la structure de données (`STRING`).
94 |
95 | ### Récupération de la valeur associée à une clé de type String
96 |
97 | Commande `GET key`.
98 |
99 | **TODO : à étoffer avec plusde commandes, des exemples sous forme de code et des copies d'écran associés**
100 |
101 | ## Ressources
102 |
103 | ### RedisInsight
104 |
105 | * [Site Officiel](https://redis.com/fr/redis-enterprise/redisinsight)
106 |
107 | ### Another Redis Desktop Manager
108 |
109 | * [Site Officiel](https://goanother.com/)
110 | * [GitHub](https://github.com/qishibo/AnotherRedisDesktopManager)
111 | * [Téléchargement des binaires sur GitHub](https://github.com/qishibo/AnotherRedisDesktopManager/releases)
--------------------------------------------------------------------------------
/redis-docker-compose-examples/pics/docker-compose-result-for-first-time-pull.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/redis-docker-compose-examples/pics/docker-compose-result-for-first-time-pull.png
--------------------------------------------------------------------------------
/redis-docker-compose-examples/pics/first-connection-to-redisinsight-001.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/redis-docker-compose-examples/pics/first-connection-to-redisinsight-001.png
--------------------------------------------------------------------------------
/redis-docker-compose-examples/pics/first-connection-to-redisinsight-002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/redis-docker-compose-examples/pics/first-connection-to-redisinsight-002.png
--------------------------------------------------------------------------------
/redis-docker-compose-examples/pics/ouverture-shell-sur-instance-redis.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/redis-docker-compose-examples/pics/ouverture-shell-sur-instance-redis.png
--------------------------------------------------------------------------------
/redis-docker-compose-examples/pics/redis-cluster-creation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/redis-docker-compose-examples/pics/redis-cluster-creation.png
--------------------------------------------------------------------------------
/redis-docker-compose-examples/redis-community-single/.env:
--------------------------------------------------------------------------------
1 | RI_APP_PORT=5540 # Default value for Docker
2 | RI_APP_HOST=0.0.0.0 # Default value for Docker
3 | RI_LOG_LEVEL=info # Default value for Docker
4 | RI_FILES_LOGGER=/data/logs # Default value for Docker
5 | RI_REDIS_HOST=redis
--------------------------------------------------------------------------------
/redis-docker-compose-examples/redis-community-single/dc-redis-single.yml:
--------------------------------------------------------------------------------
1 | services:
2 | redis:
3 | container_name: redis
4 | #image: redis:latest # To download the latest image
5 | image: redis:7.4.3 # To download a specific version, here the version 7.4.3
6 | ports:
7 | - 6379:6379
8 | # environment:
9 | # - REDIS_REPLICATION_MODE=master
10 | volumes:
11 | - ./redis/data:/var/lib/redis
12 | - ./redis/conf/redis.conf:/usr/local/etc/redis/redis.conf
13 | command: [ "redis-server", "/usr/local/etc/redis/redis.conf" ]
14 | networks:
15 | - redis_network
16 | redisinsight:
17 | container_name: redisinsight
18 | image: redis/redisinsight:latest # To download the latest image
19 | env_file:
20 | - .env
21 | environment:
22 | RI_APP_PORT: ${RI_APP_PORT}
23 | RI_APP_HOST: ${RI_APP_HOST}
24 | RI_LOG_LEVEL: ${RI_LOG_LEVEL}
25 | RI_FILES_LOGGER: ${RI_FILES_LOGGER}
26 | RI_REDIS_HOST: ${RI_REDIS_HOST}
27 | ports:
28 | - 5540:5540
29 | volumes:
30 | - ./redisinsight/data:/data
31 | networks:
32 | - redis_network
33 | depends_on:
34 | - redis
35 |
36 |
37 | networks:
38 | redis_network:
39 | driver: bridge
40 |
41 |
--------------------------------------------------------------------------------
/redis-docker-compose-examples/redis-community-single/redis/data/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/redis-docker-compose-examples/redis-community-single/redis/data/.gitkeep
--------------------------------------------------------------------------------
/redis-docker-compose-examples/redis-community-single/redisinsight/data/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TGITS/docker-compose-examples/c49956d4f31d266ca7befb7aec8e411fba65c586/redis-docker-compose-examples/redis-community-single/redisinsight/data/.gitkeep
--------------------------------------------------------------------------------