Skip to content

School project: set up a web server using Docker.

Notifications You must be signed in to change notification settings

llefranc/42_ft_server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ft_server (@42Paris)

"This is a System Administration subject. You will discover Docker and you will set up your first web server"

Alt text

About

Ft_server is a project of the mandatory part of the cursus. It's about using docker and setting up some services to run a website. We had to create our own Dockerfile on Debian, and setup the configuration for each services running in localhost.

  • The different services are :

    • A web server (Nginx) that can be access in http / https
    • Phpmyadmin
    • Wordpress
    • Mysql
  • Here is the subject

Requirement for running this project : Docker

Building and running the project

  1. Install Docker

  2. Download/Clone this repo

     git clone https://github.com/lucaslefrancq/42_ft_server.git
    
  3. cd into the root directory, and build the Dockerfile. Then run the docker image built. You have to map port 80 and 443 from docker container to the localhost using -p option (i'm mapping them to the same port on localhost, but you can choose any ports according your preferences and which ports your computer is using).

     cd 42_ft_server
     docker build -t ft_serv_img .
     docker run -p 80:80 -p 443:443 ft_serv_img
    
  4. Access the different services with http:localhost/service with your browser, or use docker exec -ti command to enter inside the docker container and see the different config files.

    docker exec -it "container id" /bin/sh
    

Sources