Kayıtlar

docker ps etiketine sahip yayınlar gösteriliyor

Deploy and config NGINX on Angular 7 + Nginx Docker

Create and run docker image docker run --name app-nginx -p 9595:80 -v /media/storage/angular7nginx-app/:/usr/share/nginx/html:ro -d nginx Go to docker image docker exec -ti app-nginx /bin/bash vim /etc/nginx/nginx.conf Add these line of code inside the http Restart docker container Check docker logs docker logs app-nginx app-nginx is application name server {     listen 80;     listen [::]:80;     server_name http://ip;     root /usr/share/nginx/html;     index index.html index.htm;     location / {         try_files $uri $uri/ /index.html; # This will allow you to refresh page in your angular app. Which will not give error 404.     } } usefull commands on docker: docker commit app-nginx nginx:latest  --> create a new docker with latest tag docker logs app-nginx -f                       ...

Docker - Review

Docker Open platform that make deployment easier, faster & more reliable using standarized container technology Docker Image: Abstraction of lightweight, stand-alone, executable package of a pice of software that includes everyting needed to run. To view all of your image use: # docker images Docker Container: Runtime environment generated based of docker images, each image can be used to create multiple exact replica of docker contrainers. Made you easier to deploy similiar environment in a matter of seconds . To view all of your your container use: # docker ps Docker Compose: Docker feature that enable you to create "template" of multiple difference service deployment in a single execution

Demo: Deploying Simple Micsoservices With Docker Compose

- Create the project directory #mkdir simple-wordpress -Install docker compose #yum -y install docker-compose -Create the following compose file as "docker-compose.yml" version: '2'    ---> compose file format version services:    ---> defining one or multiple services definition    db:       image: mysql:5.7   ---> image to be run by the service        volumes:         - db_data: var/lib/mysql  --> volume to be used by services        restart: always       environment:            MYSQL_ROOT_PASSWORD: somewordpress            MYSQL_DATABASE: wordpress            MYSQL_USER:    wordpress            MYSQL_PASSWORD: wordpress    web:        --->service name    ...