Create a docker environment for developement
This commit is contained in:
parent
ce4ec30fba
commit
ef4aa81041
7 changed files with 75 additions and 1 deletions
4
.docker/xdebug.ini
Normal file
4
.docker/xdebug.ini
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
[xdebug]
|
||||||
|
xdebug.remote_enable=1
|
||||||
|
xdebug.remote_autostart=1
|
||||||
|
xdebug.remote_host='host.docker.internal'
|
11
.dockerignore
Normal file
11
.dockerignore
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
Dockerfile*
|
||||||
|
docker-compose*
|
||||||
|
.dockerignore
|
||||||
|
.git
|
||||||
|
.gitignore
|
||||||
|
.env
|
||||||
|
*/bin
|
||||||
|
*/obj
|
||||||
|
README.md
|
||||||
|
LICENSE
|
||||||
|
.vscode
|
17
.vscode/launch.json
vendored
Normal file
17
.vscode/launch.json
vendored
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
// Verwendet IntelliSense zum Ermitteln möglicher Attribute.
|
||||||
|
// Zeigen Sie auf vorhandene Attribute, um die zugehörigen Beschreibungen anzuzeigen.
|
||||||
|
// Weitere Informationen finden Sie unter https://go.microsoft.com/fwlink/?linkid=830387
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "Listen for XDebug",
|
||||||
|
"type": "php",
|
||||||
|
"request": "launch",
|
||||||
|
"port": 9000,
|
||||||
|
"pathMappings": {
|
||||||
|
"/var/www/html": "${workspaceRoot}/src"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
19
Dockerfile
Normal file
19
Dockerfile
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
FROM php:7.1.27-apache
|
||||||
|
|
||||||
|
RUN apt -y update
|
||||||
|
RUN apt install -y --no-install-recommends \
|
||||||
|
libicu-dev \
|
||||||
|
libmagickwand-dev
|
||||||
|
|
||||||
|
RUN docker-php-ext-configure intl
|
||||||
|
RUN docker-php-ext-install intl
|
||||||
|
RUN pecl install \
|
||||||
|
xdebug \
|
||||||
|
imagick
|
||||||
|
RUN docker-php-ext-enable \
|
||||||
|
xdebug \
|
||||||
|
imagick
|
||||||
|
RUN chown -R www-data:www-data /var/www/html
|
||||||
|
|
||||||
|
COPY .docker/xdebug.ini $PHP_INI_DIR/conf.d/xdebug.ini
|
||||||
|
COPY ./src/ /var/www/html/
|
|
@ -1,3 +1,2 @@
|
||||||
# nuth.ch
|
# nuth.ch
|
||||||
|
|
||||||
The homepage of m@nuth
|
The homepage of m@nuth
|
21
docker-compose.yml
Normal file
21
docker-compose.yml
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
version: "2.3"
|
||||||
|
networks:
|
||||||
|
nuth:
|
||||||
|
|
||||||
|
services:
|
||||||
|
cms:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: ./Dockerfile
|
||||||
|
networks:
|
||||||
|
- nuth
|
||||||
|
ports:
|
||||||
|
- 8000:80
|
||||||
|
db:
|
||||||
|
image: mysql:latest
|
||||||
|
networks:
|
||||||
|
- nuth
|
||||||
|
ports:
|
||||||
|
- 13306:3306
|
||||||
|
environment:
|
||||||
|
MYSQL_ROOT_PASSWORD: root
|
3
src/index.php
Normal file
3
src/index.php
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
<?php
|
||||||
|
echo "This is a test";
|
||||||
|
?>
|
Loading…
Reference in a new issue