init
This commit is contained in:
commit
5eb0628214
8
README.md
Normal file
8
README.md
Normal file
@ -0,0 +1,8 @@
|
||||
**Základy klaudových technológií - Zadanie 1**
|
||||
**Ondrej Ladomirják**
|
||||
|
||||
|
||||
*Funkcionalita aplikácie*
|
||||
Táto aplikácia slúži na správu NoSQL databázy MongoDB. Keďže práca s databázou cez príkazový riadok nie je veľmi "user-friendly", tak súčasťou je taktiež webové rozhranie pre správu databázy Mongo-Express, v ktorom možno vytvárať nové databázy a kolekcie, a pridávať do novovytvorených kolekcií potrebné záznami
|
||||
|
||||
*Pomenované zväzky a virtuálna sieť*
|
34
docker-compose.yaml
Normal file
34
docker-compose.yaml
Normal file
@ -0,0 +1,34 @@
|
||||
version: '3'
|
||||
services:
|
||||
mongodb:
|
||||
image: mongo
|
||||
networks:
|
||||
- mongo-network
|
||||
container_name: mongodb
|
||||
restart: always
|
||||
ports:
|
||||
- 27017:27017
|
||||
environment:
|
||||
- MONGO_INITDB_ROOT_USERNAME=admin
|
||||
- MONGO_INITDB_ROOT_PASSWORD=admin
|
||||
volumes:
|
||||
- mongo_data:/data/db
|
||||
mongo-express:
|
||||
image: mongo-express
|
||||
networks:
|
||||
- mongo-network
|
||||
container_name: mongo-express
|
||||
restart: always
|
||||
ports:
|
||||
- 8081:8081
|
||||
environment:
|
||||
- ME_CONFIG_MONGODB_ADMINUSERNAME=admin
|
||||
- ME_CONFIG_MONGODB_ADMINPASSWORD=admin
|
||||
- ME_CONFIG_MONGODB_SERVER=mongodb
|
||||
volumes:
|
||||
mongo_data:
|
||||
driver: local
|
||||
name: mongo-db-data
|
||||
networks:
|
||||
mongo-network:
|
||||
name: mongo-network-zct
|
7
remove-app.sh
Normal file
7
remove-app.sh
Normal file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
echo "Removing App :("
|
||||
|
||||
docker container rm mongodb mongo-express
|
||||
docker volume rm mongo-db-data
|
||||
docker network rm mongo-network-zct
|
7
start-app.sh
Normal file
7
start-app.sh
Normal file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
docker-compose up -d
|
||||
|
||||
echo "Running app ..."
|
||||
echo "The app is available at http://localhost:8081"
|
5
stop-app.sh
Normal file
5
stop-app.sh
Normal file
@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
echo "Stopping App ..."
|
||||
docker-compose stop
|
Loading…
Reference in New Issue
Block a user