Giter Site home page Giter Site logo

ft_server's Introduction

ft_server

Photo by Brian Jones on Unsplash

Table of contents:

Click to expand
  1. Description
  2. Instructions
    1. Contents
    2. Download and build
    3. Run a conteiner
    4. Autoindex
  3. Research
    1. Docker
      1. Start here
      2. Virtual Machines vs Containers
    2. Web-server
      1. Server
      2. Linux
      3. Nginx
      4. Mysql
      5. Makefile
      6. Wordpress
      7. SSL
      8. Phpmyadmin
    3. Useful links to understand containers deeper

๐Ÿ‘จ๐Ÿปโ€๐Ÿซ Description

ft_server is a school 21(42) project.

Project could be used to build a LEMP-stack web-server docker image.

Stack of technologies: debian, nginx, mariadb, phpmyadmin, php, wordpress

๐Ÿ‘‰๐Ÿป Instructions

๐Ÿ“ฆ Contents

Dockerfile with all instructions to build a server image.

srcs/ contains configs and some bash scripts.

Makefile to simplify running commands and save or logs while building to the file build_logs (will be created by running make build),

๐Ÿ”จ Download and build

git clone https://github.com/kukinpower/ft_server.git
cd ft_server
make build

Or you can simply pull the image:

docker pull docker.pkg.github.com/kukinpower/ft_server/ft_server:1.0

๐Ÿƒ๐Ÿผโ€โ™€๏ธ Run a container

make run to run a container

or docker run -it -p 80:80 -p 443:443 ft_server:latest if you pulled an image from github.

๐Ÿ—‚ Autoindex

to turn autoindex off bash ~/autoindex_off.sh

to turn autoindex on bash ~/autoindex_on.sh

๐Ÿ•ต๐Ÿฝโ€โ™€๏ธ Research

๐Ÿณ Docker

๐Ÿ‘‰๐Ÿป Start here

Or start Docker Curriculum by Prakhar Srivastav

The Docker handbook

If your internet is slow or you are using mobile internet, use this platform to play with docker.

After every instruction a new layer is created.

RUN instruction to execute commands. In shell form it commits a new layer with execution result. The result will be used for a next step. I use \ to split command to several lines.

If WORKDIR isn't specified, the / root directory will be used as work directory.

COPY . .

The first dot . is current folder in host ilesystem, where the Dockerfile is. The second dot . is the folder in docker container filesystem which defined by WORKDIR command in dockerfile

๐Ÿ“ฆ Virtual Machines vs Containers

VM Container
Heavyweight Lightweight
Full isolated from the host OS and other VM's Lightweight isolated from host and other containers
Runs it's own OS Shares OS with the host
VM can use different OS from the host Can use OS with the same kernel as host
Startup in minutes Much faster startup

Web-server

๐ŸŽฉ Server

server is a role, that computer takes. Every computer could be a server.

Types of servers are types of services that servers provide.

LEMP stack means: Linux, Nginx, MySQL, PHP.

var/www or var/www/html?

www-data:www-data the first one is user, the second is group. That is what debian server uses by default.

Linux

What is apt-get

The y flag is for auto "Yes"

Difference between apt and apt-get:

Nginx

Mysql

FLUSH PRIVILEGES reloads grant tables.

Wordpress:

๐Ÿ”SSL:

Phpbyadmin

Makefile:

๐Ÿ”— Useful links to understand containers deeper

Author Roman Kukin

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.