Skip to content

Commit

Permalink
Update docker server: remove jre
Browse files Browse the repository at this point in the history
Add new docker image based on server with jre
Enable by default xdebug in dev server image
Update images version in env and README
  • Loading branch information
MatthewPattell committed Mar 26, 2019
1 parent f3e7c49 commit eb097b0
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 15 deletions.
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,16 @@ to the require section of your `composer.json` file.

## PhpStorm samples
- [Deploy config](phpstorm/SAMPLE_DEPLOY_CONFIG.xml)

## Latest docker images
- NGINX
- matthewpatell/universal-docker-nginx:3.5
- SERVER
- matthewpatell/universal-docker-server:3.9
- matthewpatell/universal-docker-server:3.9-dev
- matthewpatell/universal-docker-server:3.9-jre (with java)
- PHP-FPM:
- matthewpatell/universal-docker-server-php-fpm:3.8

**FEATURES**
---
Expand Down Expand Up @@ -109,9 +119,9 @@ to the require section of your `composer.json` file.

- with server images:

```docker run --rm --interactive --volume $PWD:/app matthewpatell/universal-docker-server:3.8 bash -c 'cd /app && composer install --no-scripts'```
```docker run --rm --interactive --volume $PWD:/app matthewpatell/universal-docker-server:3.9 bash -c 'cd /app && composer install --no-scripts'```

- with server image and additional global packages:
```docker run --rm --interactive --volume $PWD:/app matthewpatell/universal-docker-server:3.8 bash -c 'cd /app && composer global require "fxp/composer-asset-plugin:^1.4.2" && composer global require "hirak/prestissimo:~0.3.7" && composer install --no-scripts'```
```docker run --rm --interactive --volume $PWD:/app matthewpatell/universal-docker-server:3.9 bash -c 'cd /app && composer global require "fxp/composer-asset-plugin:^1.4.2" && composer global require "hirak/prestissimo:~0.3.7" && composer install --no-scripts'```

That's all. Check it. :)
6 changes: 3 additions & 3 deletions docker/.env-default
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ XDEBUG_CONFIG="default_enable=0 remote_host=172.18.0.1 remote_enable=0 profiler_

# IMAGES REPOSITORIES
NGINX_REPOSITORY=matthewpatell/universal-docker-nginx:3.5
SERVER_REPOSITORY=matthewpatell/universal-docker-server:3.8-dev
SERVER_REPOSITORY=matthewpatell/universal-docker-server:3.9-dev

# For production environment:
#SERVER_REPOSITORY=matthewpatell/universal-docker-server:3.8
#SERVER_REPOSITORY=matthewpatell/universal-docker-server:3.9

# For production environment with ngingx+php scaling
#SERVER_REPOSITORY=matthewpatell/universal-docker-server-php-fpm:3.8
#TERMINAL_REPOSITORY=matthewpatell/universal-docker-server:3.8
#TERMINAL_REPOSITORY=matthewpatell/universal-docker-server:3.9

# DOMAINS
#DOMAIN_API=api.sampledomain.com
Expand Down
6 changes: 4 additions & 2 deletions docker/Dockerfile-dev-server
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
FROM matthewpatell/universal-docker-server:3.8
FROM matthewpatell/universal-docker-server:3.9

# TODO: write script which will generate group of dockerfiles with same version
# RUN apt-get update

RUN apt-get install -y \
php7.1-dev \
php7.1-phpdbg \
php-codesniffer

RUN phpenmod xdebug
3 changes: 0 additions & 3 deletions docker/Dockerfile-server
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,4 @@ RUN apt-get update -y --fix-missing \
&& apt-get install -y supervisor \
&& mkdir -p /var/log/supervisord

# Install java
RUN apt-get install -y default-jre

CMD service php7.1-fpm start && supervisord -n
6 changes: 6 additions & 0 deletions docker/Dockerfile-server-jre
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM matthewpatell/universal-docker-server:3.9

# RUN apt-get update

# Install java
RUN apt-get install -y default-jre
4 changes: 2 additions & 2 deletions docs/ENVIRONMENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ Property | Values | Description
## <a id="images-envs"></a>Images env (service: all)
Property | Values | Description
---------|--------|------------
`NGINX_REPOSITORY`| `(string)` `Default: matthewpatell/universal-docker-nginx:3.2` | Nginx docker image
`SERVER_REPOSITORY`| `(string)` `Default: matthewpatell/universal-docker-server:3.8-dev` | Either server (or server dev) image in non-scalable configuration, or `matthewpatell/universal-docker-server-php-fpm` for scaling `nginx`+`php-fpm`.
`NGINX_REPOSITORY`| `(string)` `Default: matthewpatell/universal-docker-nginx:3.5` | Nginx docker image
`SERVER_REPOSITORY`| `(string)` `Default: matthewpatell/universal-docker-server:3.9-dev` | Either server (or server dev) image in non-scalable configuration, or `matthewpatell/universal-docker-server-php-fpm` for scaling `nginx`+`php-fpm`.
`TERMINAL_REPOSITORY`| `(string)` `Default: none` | Static non-scalable docker image for ssh connection, cron, queue listener and etc. Use image: `matthewpatell/universal-docker-server`.

## <a id="server-envs"></a>Server env (service: server)
Expand Down
4 changes: 2 additions & 2 deletions sample/.env-sample
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ DOMAIN_COMMON=sample.io

# IMAGES REPOSITORIES
# For production environment:
#SERVER_REPOSITORY=matthewpatell/universal-docker-server:3.8
#SERVER_REPOSITORY=matthewpatell/universal-docker-server:3.9

# For production environment with ngingx+php scaling
#SERVER_REPOSITORY=matthewpatell/universal-docker-server-php-fpm:3.8
#TERMINAL_REPOSITORY=matthewpatell/universal-docker-server:3.8
#TERMINAL_REPOSITORY=matthewpatell/universal-docker-server:3.9

SERVICES="${SERVICES} -f docker/docker-compose.common.yml -f docker/docker-compose.local.yml"

Expand Down
2 changes: 1 addition & 1 deletion sample/.env-sample-prod
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ SSL_DOMAINS[0]="[email protected] :api.sample.com sample.com:"
SERVICES="-f !!docker-compose.yml -f !!docker-compose.prod.yml -f docker/docker-compose.common.yml"

# IMAGES (use this image if you are not going to do autoscaling)
SERVER_REPOSITORY=matthewpatell/universal-docker-server:3.8
SERVER_REPOSITORY=matthewpatell/universal-docker-server:3.9

# OTHER CONFIGS
# https://github.com/settings/tokens
Expand Down

0 comments on commit eb097b0

Please sign in to comment.