Skip to content

hochgenug/docker-vns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker for VNS project

License: MIT

This project is based on ajardin repository

Architecture

Additional Features

Since this environment is designed for a local usage, it comes with features helping the development workflow.

The web container has a mount point used to share source files. By default, the ~/www/ directory is mounted from the host. It's possible to change this path by editing the docker-compose.yml file.

It's also possible to add custom virtual hosts: all ./web/vhosts/*.conf files are copied in the Apache directory during the image build process.

And the ./web/custom.ini file is used to customize the PHP configuration during the image build process.

Installation

This process assumes that Docker Engine and Docker Compose are installed. Otherwise, you should have a look to Install Docker Engine before proceeding further.

Clone the repository

$ git clone git@github.com:hochgenug/docker-vns.git vns

Define the environment variables

$ cp docker-env.dist docker-env
$ nano docker-env

Build the environment

$ docker-compose build
$ docker-compose up -d
# or make start

Check the containers

$ docker-compose ps
        Name                      Command               State              Ports
--------------------------------------------------------------------------------------------
docker-vns_maildev_1   bin/maildev --web 80 --smtp 25   Up      25/tcp, 0.0.0.0:1088->80/tcp
docker-vns_mysql_1     docker-entrypoint.sh mysqld      Up      0.0.0.0:3306->3306/tcp
docker-vns_web_1       docker-php-entrypoint apac ...   Up      0.0.0.0:80->80/tcp

Note: You will see something slightly different if you do not clone the repository in a vns directory. The container prefix depends on your directory name.

Enter in the web container

$ docker exec -it vns_web_1 bash
# or : make web

(To get the name use the docker-compose ps command)

Use Makefile

You can also use the Makefile for commands.

Syntax : make <command>

$ make help
backup                         Backup the "mysql" volume
build                          Build the environment
logs                           Follow logs generated by all containers
logs-full                      Follow logs generated by all containers from the containers creation
mysql                          Open a terminal in the "mysql" container
ps                             List all containers managed by the environment
restart                        Restart the environment
restore                        Restore the "mysql" volume
start                          Start the environment
stats                          Print real-time statistics about containers ressources usage
stop                           Stop the environment
web                            Open a terminal in the "web" container

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published