kreiran docker-compose koji pokreće mongodb
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -36,3 +36,5 @@ yarn-error.log*
|
|||||||
next-env.d.ts
|
next-env.d.ts
|
||||||
|
|
||||||
postgres
|
postgres
|
||||||
|
|
||||||
|
mongo
|
||||||
@@ -1,33 +1,22 @@
|
|||||||
# this compose file runs Postgres db and exposes it's port to the host machine
|
# this compose file runs Postgres db and exposes it's port to the host machine
|
||||||
version: "3.7"
|
version: "3.7"
|
||||||
|
|
||||||
volumes:
|
|
||||||
postgres:
|
|
||||||
pgadmin:
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
db:
|
mongo:
|
||||||
image: postgres:16.1-alpine
|
image: mongo:6.0.12
|
||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_USER: postgres
|
MONGO_INITDB_ROOT_USERNAME: root
|
||||||
POSTGRES_PASSWORD: postgres
|
MONGO_INITDB_ROOT_PASSWORD: example
|
||||||
POSTGRES_DB: dashboard
|
|
||||||
ports:
|
|
||||||
- 5432:5432
|
|
||||||
volumes:
|
volumes:
|
||||||
# store postgres data in a local `postgres` directory
|
- ./mongo:/data/db
|
||||||
- postgres:/var/lib/postgresql/data
|
mongo-express:
|
||||||
pgadmin:
|
image: mongo-express
|
||||||
image: dpage/pgadmin4:8.1
|
restart: always
|
||||||
|
ports:
|
||||||
|
- 8081:8081
|
||||||
environment:
|
environment:
|
||||||
PGADMIN_DEFAULT_EMAIL: admin@example.com
|
ME_CONFIG_MONGODB_ADMINUSERNAME: root
|
||||||
PGADMIN_DEFAULT_PASSWORD: SuperSecret
|
ME_CONFIG_MONGODB_ADMINPASSWORD: example
|
||||||
PGADMIN_LISTEN_PORT: 80
|
ME_CONFIG_MONGODB_URL: mongodb://root:example@mongo:27017/
|
||||||
ports:
|
|
||||||
- 8080:80
|
|
||||||
volumes:
|
|
||||||
- pgadmin:/var/lib/pgadmin
|
|
||||||
depends_on:
|
|
||||||
- db
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user