LAMP server based on Docker for web development with the possibility of running multiple projects
$ mkdir ./www/site1
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName site1
ServerAlias www.site1
DocumentRoot /var/www/site1
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /var/www/site1>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/site1_error.log
CustomLog ${APACHE_LOG_DIR}/site1_access.log combined
</VirtualHost>
extra_hosts:
- "site1:127.0.0.1"
- "site2:127.0.0.1"
127.0.0.1 site1
127.0.0.1 site2
$ sudo docker-compose up --build
$ docker-compose up
$ docker-compose exec -u pks web bash
$ cd site1/
$ npm install
$ npm run watch
Virtual hosts are available in the host system by ports: 8080, 3000, 3001 (e.g. http://site1:8080, or http://site1:3000 in case of using browserSync)
phpMyAdmin available by port: 8181 (e.g. http://localhost:8181), with login root and password toor