add z1
This commit is contained in:
parent
f6c46e43cc
commit
129d266b16
8
z1/README.md
Normal file
8
z1/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
z1/docker-compose.yaml
Normal file
34
z1/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
z1/remove-app.sh
Normal file
7
z1/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
z1/start-app.sh
Normal file
7
z1/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
z1/stop-app.sh
Normal file
5
z1/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