Skip to content

Commit 0956a51

Browse files
authored
Merge pull request #1 from readymadehost/development
Development updates
2 parents f8c4ef8 + 00b66f2 commit 0956a51

File tree

8 files changed

+353
-30
lines changed

8 files changed

+353
-30
lines changed

.env.sample

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
1+
############################
2+
###> docker configuration ###
3+
# https://hub.docker.com/orgs/readymadehost/repositories
4+
DOCKER_TAG=latest
5+
6+
###< docker configuration ###
7+
############################
8+
19
#############################
210
###> varnish configuration ###
311

412
# varnish version
5-
# ie: 6.4, 6.0 or any valid version
6-
VARNISH_VERSION=6.4
13+
# ie: 6.2, 6.3, 6.4, 6.5, 7.0 or any valid version
14+
# https://hub.docker.com/_/varnish?tab=tags
15+
VARNISH_VERSION=7.0
716
VARNISH_PORT=8088
817

918
###< varnish configuration ###
@@ -43,8 +52,8 @@ PHP_ENABLE_XDEBUG=0
4352
###> nodejs configuration ###
4453

4554
# node version
46-
# ie: 10.x, 11.x, 12.x, 13.x, 14.x or any valid version
47-
NODE_VERSION=14.x
55+
# ie: 10.x, 11.x, 12.x, 13.x, 14.x, 15.x, 16.x, 17.x or any valid version
56+
NODE_VERSION=16.x
4857

4958
###< nodejs configuration ###
5059
#############################
@@ -56,6 +65,7 @@ NODE_VERSION=14.x
5665

5766
# mariadb version
5867
# ie: 10.1, 10.2, 10.3, 10.4 or any valid version
68+
# https://hub.docker.com/_/mariadb?tab=tags
5969
MARIADB_VERSION=10.4
6070

6171
# mariadb expose port
@@ -83,7 +93,8 @@ PHPMYADMIN_PORT=8081
8393
###> redis configuration ###
8494

8595
# redis version
86-
# ie: 5.0, 6.0, 6.2 or any valid version
96+
# ie: 5.x, 6.x, 6.2 or any valid version
97+
# https://hub.docker.com/_/redis?tab=tags
8798
REDIS_VERSION=6.2
8899

89100
###< redis configuration ###
@@ -94,8 +105,9 @@ REDIS_VERSION=6.2
94105
###> elasticsearch configuration ###
95106

96107
# elasticsearch version
97-
# ie: 7.8.1, 7.9.3 or any valid version
98-
ELASTICSEARCH_VERSION=7.9.3
108+
# ie: 5.x, 6.x, 7.x or any valid version
109+
# https://hub.docker.com/_/elasticsearch?tab=tags
110+
ELASTICSEARCH_VERSION=7.17.2
99111

100112
###< elasticsearch configuration ###
101113
#############################
@@ -105,8 +117,9 @@ ELASTICSEARCH_VERSION=7.9.3
105117
###> rabbitmq configuration ###
106118

107119
# rabbitmq version
108-
# ie: 3.8 or any valid version
109-
RABBITMQ_VERSION=3.8
120+
# ie: 2.x, 3.x, 3.9 or any valid version
121+
# https://hub.docker.com/_/rabbitmq?tab=tags
122+
RABBITMQ_VERSION=3.9
110123

111124
###< rabbitmq configuration ###
112125
#############################

.github/workflows/docker-build.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,12 @@ jobs:
1313
- name: Checkout repository
1414
uses: actions/checkout@v3
1515
- name: Docker build cache
16-
uses: satackey/action-docker-layer-caching@v0.0.8
16+
uses: satackey/action-docker-layer-caching@v0.0.11
1717
continue-on-error: true
18+
with:
19+
key: magento2-dev-docker-cache-{hash}
20+
restore-keys: |
21+
magento2-dev-docker-cache-
1822
- name: Copy .env.sample to .env
1923
run: cp .env.sample .env
2024
- name: For php8.1

.github/workflows/docker-publish.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Docker Publish
22

33
on:
44
schedule:
5-
- cron: '30 10 * * *'
5+
- cron: '30 22 * * *'
66
push:
77
branches: [ main ]
88

@@ -15,8 +15,12 @@ jobs:
1515
- name: Checkout repository
1616
uses: actions/checkout@v3
1717
- name: Docker build cache
18-
uses: satackey/action-docker-layer-caching@v0.0.8
18+
uses: satackey/action-docker-layer-caching@v0.0.11
1919
continue-on-error: true
20+
with:
21+
key: magento2-dev-docker-cache-{hash}
22+
restore-keys: |
23+
magento2-dev-docker-cache-
2024
- name: Docker Login
2125
env:
2226
DOCKER_USER: ${{secrets.DOCKER_USER}}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Docker Release
2+
3+
on:
4+
schedule:
5+
- cron: '30 22 * * *'
6+
push:
7+
branches: [ main ]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v3
17+
- name: Set env
18+
run: echo ::set-env name=RELEASE_VERSION::$(echo ${GITHUB_REF:10})
19+
- name: Docker build cache
20+
uses: satackey/action-docker-layer-caching@v0.0.11
21+
continue-on-error: true
22+
with:
23+
key: magento2-dev-docker-cache-{hash}
24+
restore-keys: |
25+
magento2-dev-docker-cache-
26+
- name: Docker Login
27+
env:
28+
DOCKER_USER: ${{secrets.DOCKER_USER}}
29+
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
30+
run: docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
31+
- name: Copy .env.sample to .env
32+
run: cp .env.sample .env
33+
- name: For php8.1
34+
run: PHP_VERSION=8.1 DOCKER_TAG=$RELEASE_VERSION docker-compose -f docker-compose-publish.yml build && PHP_VERSION=8.1 DOCKER_TAG=$RELEASE_VERSION docker-compose -f docker-compose-publish.yml push
35+
- name: For php8.0
36+
run: PHP_VERSION=8.0 DOCKER_TAG=$RELEASE_VERSION docker-compose -f docker-compose-publish.yml build && PHP_VERSION=8.0 DOCKER_TAG=$RELEASE_VERSION docker-compose -f docker-compose-publish.yml push
37+
- name: For php7.4
38+
run: PHP_VERSION=7.4 DOCKER_TAG=$RELEASE_VERSION docker-compose -f docker-compose-publish.yml build && PHP_VERSION=7.4 DOCKER_TAG=$RELEASE_VERSION docker-compose -f docker-compose-publish.yml push
39+
- name: For php7.3
40+
run: PHP_VERSION=7.3 DOCKER_TAG=$RELEASE_VERSION docker-compose -f docker-compose-publish.yml build && PHP_VERSION=7.3 DOCKER_TAG=$RELEASE_VERSION docker-compose -f docker-compose-publish.yml push
41+
- name: For php7.2
42+
run: PHP_VERSION=7.2 DOCKER_TAG=$RELEASE_VERSION docker-compose -f docker-compose-publish.yml build && PHP_VERSION=7.2 DOCKER_TAG=$RELEASE_VERSION docker-compose -f docker-compose-publish.yml push
43+
- name: For php7.1
44+
run: PHP_VERSION=7.1 DOCKER_TAG=$RELEASE_VERSION docker-compose -f docker-compose-publish.yml build && PHP_VERSION=7.1 DOCKER_TAG=$RELEASE_VERSION docker-compose -f docker-compose-publish.yml push

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ A development docker for every magento2 project
88
- Build for magento2 projects
99
- Bundle of `fpm`, `cli`, `nginx`, `mariadb`, `phpmyadmin`, `redis` , `elasticsearch`, `rabbitmq`, `emailcatcher` and `varnish` containers
1010
- PHP 7.1, 7.2, 7.3, 7.4, 8.0 and 8.1 supported
11-
- Latest database mariadb10.4, mariadb10.2 and other versions supported
12-
- Latest node14.x, node13.x, node12.x, ... supported
13-
- Latest redis-6.x, redis-5.x, ... supported
14-
- Latest elasticsearch-7.9.x, elasticsearch-6.x, ... supported
15-
- Latest rabbitmq-3.8.x, ... supported
16-
- Latest varnish-6.4, varnish-6.0, ... supported
11+
- Database mariadb 10.1, 10.2, 10.3, 10.4, ... supported
12+
- Node 14.x, 16.x, 17.x, ... supported
13+
- Redis 5.x, 6.x, 6.2, ... supported
14+
- Elasticsearch 5.x, 6.x, 7.x, ... supported
15+
- Rabbitmq 2.x, 3.x, 3.9, ... supported
16+
- Varnish 4.x, 5.x, 6.x, 7.x, ... supported
1717
- Included n98-magerun2, composer, node cli, yarn cli and grunt cli
1818
- Included emailcatcher with smtp and web view
1919
- Support for PhpStorm or VSCode + WSL2/docker-desktop setup

docker-compose-publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ services:
77
args:
88
PHP_ENABLE_REDIS: ${PHP_ENABLE_REDIS}
99
PHP_ENABLE_XDEBUG: ${PHP_ENABLE_XDEBUG}
10-
image: readymadehost/magento2-dev-docker-php${PHP_VERSION}-fpm:latest
10+
image: readymadehost/magento2-dev-docker-php${PHP_VERSION}-fpm:${DOCKER_TAG}
1111

1212
cli:
1313
build:
@@ -16,4 +16,4 @@ services:
1616
NODE_VERSION: ${NODE_VERSION}
1717
PHP_ENABLE_REDIS: ${PHP_ENABLE_REDIS}
1818
PHP_ENABLE_XDEBUG: ${PHP_ENABLE_XDEBUG}
19-
image: readymadehost/magento2-dev-docker-php${PHP_VERSION}-cli:latest
19+
image: readymadehost/magento2-dev-docker-php${PHP_VERSION}-cli:${DOCKER_TAG}

docker-compose.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
version: '3'
22

33
services:
4-
# varnish:
5-
# image: varnish:${VARNISH_VERSION}
6-
# ports:
7-
# - ${VARNISH_PORT}:80
8-
# links:
9-
# - nginx
4+
varnish:
5+
image: varnish:${VARNISH_VERSION}
6+
ports:
7+
- ${VARNISH_PORT}:80
8+
volumes:
9+
- ./varnish/default.vcl:/etc/varnish/default.vcl
10+
depends_on:
11+
- nginx
1012

1113
nginx:
1214
image: nginx:alpine
@@ -26,7 +28,7 @@ services:
2628
# args:
2729
# PHP_ENABLE_REDIS: ${PHP_ENABLE_REDIS}
2830
# PHP_ENABLE_XDEBUG: ${PHP_ENABLE_XDEBUG}
29-
image: readymadehost/magento2-dev-docker-php${PHP_VERSION}-fpm:latest
31+
image: readymadehost/magento2-dev-docker-php${PHP_VERSION}-fpm:${DOCKER_TAG}
3032
environment:
3133
PHP_ENABLE_REDIS: ${PHP_ENABLE_REDIS}
3234
PHP_ENABLE_XDEBUG: ${PHP_ENABLE_XDEBUG}
@@ -39,7 +41,7 @@ services:
3941
- redis
4042
- elasticsearch
4143
- rabbitmq
42-
- mailcatcher
44+
# - mailcatcher
4345

4446
cli:
4547
# build:
@@ -48,7 +50,7 @@ services:
4850
# NODE_VERSION: ${NODE_VERSION}
4951
# PHP_ENABLE_REDIS: ${PHP_ENABLE_REDIS}
5052
# PHP_ENABLE_XDEBUG: ${PHP_ENABLE_XDEBUG}
51-
image: readymadehost/magento2-dev-docker-php${PHP_VERSION}-cli:latest
53+
image: readymadehost/magento2-dev-docker-php${PHP_VERSION}-cli:${DOCKER_TAG}
5254
environment:
5355
PHP_ENABLE_REDIS: ${PHP_ENABLE_REDIS}
5456
PHP_ENABLE_XDEBUG: ${PHP_ENABLE_XDEBUG}
@@ -60,7 +62,7 @@ services:
6062
- redis
6163
- elasticsearch
6264
- rabbitmq
63-
- mailcatcher
65+
# - mailcatcher
6466

6567
mariadb:
6668
image: mariadb:${MARIADB_VERSION}

0 commit comments

Comments
 (0)