Skip to content

Commit

Permalink
update wordpress && added https
Browse files Browse the repository at this point in the history
  • Loading branch information
12evgen committed Oct 19, 2019
1 parent b891607 commit 4a80518
Show file tree
Hide file tree
Showing 1,924 changed files with 38,644 additions and 383,748 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

### PROJECT SETTINGS

PROJECT_NAME=my_wordpress_project
PROJECT_NAME=top_fashion
PROJECT_BASE_URL=wp.docker.localhost

DB_NAME=wordpress
Expand Down
40 changes: 15 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,36 +43,11 @@ The WordPress stack consist of the following containers:

Supported WordPress versions: 5

❗️PHP 5.6 [has reached end of life](http://php.net/supported-versions.php) and no longer supported by PHP team. PHP 7.1 is currently in security fix only mode. We strongly advise you to migrate to the latest stable PHP version.

## Documentation

Full documentation is available at https://wodby.com/docs/stacks/wordpress/local.

## Images' tags

Images tags format is `[VERSION]-[STABILITY_TAG]` where:

`[VERSION]` is the _version of an application_ (without patch version) running in a container, e.g. `wodby/nginx:1.15-x.x.x` where Nginx version is `1.15` and `x.x.x` is a stability tag. For some images we include both major and minor version like PHP `7.2`, for others we include only major like Redis `5`.

`[STABILITY_TAG]` is the _version of an image_ that corresponds to a git tag of the image repository, e.g. `wodby/mariadb:10.2-3.3.8` has MariaDB `10.2` and stability tag [`3.3.8`](https://github.com/wodby/mariadb/releases/tag/3.3.8). New stability tags include patch updates for applications and image's fixes/improvements (new env vars, orchestration actions fixes, etc). Stability tag changes described in the corresponding a git tag description. Stability tags follow [semantic versioning](https://semver.org/).

We highly encourage to use images only with stability tags.

## Maintenance

We regularly update images used in this stack and release them together, see [releases page](https://github.com/wodby/docker4wordpress/releases) for full changelog and update instructions. Most of routine updates for images and this project performed by [the bot](https://github.com/wodbot) via scripts located at [wodby/images](https://github.com/wodby/images).

## Beyond local environment

Docker4WordPress is a project designed to help you spin up local environment with docker-compose. If you want to deploy a consistent stack with orchestrations to your own server, check out [![WordPress stack on Wodby](https://www.google.com/s2/favicons?domain=wodby.com) Wodby](https://wodby.com/stacks/wordpress).

## Other Docker4x projects

* [docker4php](https://github.com/wodby/docker4php)
* [docker4drupal](https://github.com/wodby/docker4drupal)
* [docker4ruby](https://github.com/wodby/docker4ruby)
* [docker4python](https://github.com/wodby/docker4python)

## License

Expand Down Expand Up @@ -143,3 +118,18 @@ docker-compose down -v
docker-compose up
```
If there are no .sql files in this folder, no action will be taken when the container is built.

Exporting a specific database:
```
docker-compose exec mariadb sh -c 'exec mysqldump -uroot -p"root-password" my-db' > my-db.sql
```

# Environment variables

* nginx/apache - [https://wp.docker.localhost:443](https://wp.docker.localhost:443)
* pma - [https://pma.wp.docker.localhost:443](https://pma.wp.docker.localhost:443)
* adminer - [https://adminer.wp.docker.localhost:443](https://adminer.wp.docker.localhost:443)
* mailhog - [https://mailhog.wp.docker.localhost:443](https://mailhog.wp.docker.localhost:443)
* varnish - [https://varnish.wp.docker.localhost:443](https://varnish.wp.docker.localhost:443)
* portainer - [https://portainer.wp.docker.localhost:443](https://portainer.wp.docker.localhost:443)
* webgrind - [https://webgrind.wp.docker.localhost:443](https://webgrind.wp.docker.localhost:443)
40 changes: 32 additions & 8 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ services:
MYSQL_DATABASE: $DB_NAME
MYSQL_USER: $DB_USER
MYSQL_PASSWORD: $DB_PASSWORD
volumes:
- ./mariadb-init:/docker-entrypoint-initdb.d # Place init .sql file(s) here.
# - /path/to/mariadb/data/on/host:/var/lib/mysql # I want to manage volumes manually.
# volumes:
# - ./mariadb-init:/docker-entrypoint-initdb.d # Place init .sql file(s) here.
## - /path/to/mariadb/data/on/host:/var/lib/mysql # I want to manage volumes manually.

php:
image: wodby/wordpress-php:$PHP_TAG
Expand Down Expand Up @@ -59,14 +59,20 @@ services:
# - ./:/var/www/html:cached # User-guided caching
# - docker-sync:/var/www/html # Docker-sync
labels:
- "traefik.enable=true"
- "traefik.http.routers.${PROJECT_NAME}_nginx.rule=Host(`${PROJECT_BASE_URL}`)"
- "traefik.http.routers.${PROJECT_NAME}_nginx.entrypoints=websecure"
- "traefik.http.routers.${PROJECT_NAME}_nginx.tls.certresolver=mytlschallenge"

mailhog:
image: mailhog/mailhog
container_name: "${PROJECT_NAME}_mailhog"
labels:
- "traefik.http.services.${PROJECT_NAME}_mailhog.loadbalancer.server.port=8025"
- "traefik.enable=true"
- "traefik.http.routers.${PROJECT_NAME}_mailhog.rule=Host(`mailhog.${PROJECT_BASE_URL}`)"
- "traefik.http.routers.${PROJECT_NAME}_mailhog.entrypoints=websecure"
- "traefik.http.routers.${PROJECT_NAME}_mailhog.tls.certresolver=mytlschallenge"

# postgres:
# image: wodby/postgres:$POSTGRES_TAG
Expand Down Expand Up @@ -146,7 +152,10 @@ services:
PHP_UPLOAD_MAX_FILESIZE: 1G
PHP_MAX_INPUT_VARS: 1G
labels:
- "traefik.enable=true"
- "traefik.http.routers.${PROJECT_NAME}_pma.rule=Host(`pma.${PROJECT_BASE_URL}`)"
- "traefik.http.routers.${PROJECT_NAME}_pma.entrypoints=websecure"
- "traefik.http.routers.${PROJECT_NAME}_pma.tls.certresolver=mytlschallenge"

# athenapdf:
# image: arachnysdocker/athenapdf-service:$ATHENAPDF_TAG
Expand Down Expand Up @@ -231,17 +240,32 @@ services:
volumes:
- /var/run/docker.sock:/var/run/docker.sock
labels:
- "traefik.enable=true"
- "traefik.http.routers.${PROJECT_NAME}_portainer.rule=Host(`portainer.${PROJECT_BASE_URL}`)"
- "traefik.http.routers.${PROJECT_NAME}_portainer.entrypoints=websecure"
- "traefik.http.routers.${PROJECT_NAME}_portainer.tls.certresolver=mytlschallenge"

traefik:
image: traefik:v2.0
image: "traefik:v2.0.0-rc3"
container_name: "${PROJECT_NAME}_traefik"
command: --api.insecure=true --providers.docker
command:
#- "--log.level=DEBUG"
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
- "--entrypoints.websecure.address=:443"
- "--certificatesresolvers.myhttpchallenge.acme.httpchallenge=true"
- "--certificatesresolvers.myhttpchallenge.acme.httpchallenge.entrypoint=web"
#- "--certificatesresolvers.myhttpchallenge.acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory"
- "--certificatesresolvers.myhttpchallenge.acme.email=postmaster@mydomain.com"
- "--certificatesresolvers.myhttpchallenge.acme.storage=/letsencrypt/acme.json"
ports:
- '8888:80'
# - '8080:8080' # Dashboard
- "443:443"
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- "./letsencrypt:/letsencrypt"
- "/var/run/docker.sock:/var/run/docker.sock:ro"

#volumes:
## Docker-sync for macOS users
Expand Down
19 changes: 19 additions & 0 deletions letsencrypt/acme.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"mytlschallenge": {
"Account": {
"Email": "[email protected]",
"Registration": {
"body": {
"status": "valid",
"contact": [
"mailto:[email protected]"
]
},
"uri": "https://acme-v02.api.letsencrypt.org/acme/acct/69688705"
},
"PrivateKey": "MIIJKAIBAAKCAgEAt5sxfQL+U+VeQ682ILKOmCk6SQAl9a0SrAhmKD5hSeypyrAZ9y1sDG1cljCY5/gof78rIQOShWxN+X49UMWtbUCoNOSbyKlafrON3EDNHu2z2YY8Vob6LCCUJxlRuCccbkZ2tl/qgJ3cnHNZ8alKMm3qCrm2AANfrNoKtaqnBF9VruSTVcyXm2SOrpc5VA/3K9+fN8zKKhJBJRiOIE2tHVINI1bzFqRKVcEpPXwQL6rBD7nDrhdldCyJlO+fsBtWwBjgZ3IWl4iou4SAzMgcBORvDb2oL+MCW5SUc0skFdmDfCl5jZdDUxK9jOLxfamOtLW0B9OthB7VPEAOc4uP28Oq2m+DNJuaZkPO+kIi6OklnbOTkSsH3TCO/TJrdzysa0DVtvNkeaj/WP25IlzK0q0nDEgLtnMYp/2jiZqFRY27XeMaEk/FN3MaCv6NcFPDNtnlyH2cy7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l3VVCE+1mvQoBy8g2nl7vrMHcF5QQ2GkLVdttsDp+Vdj1D8noofr9X1Lf3kuKJF4kiBQFyosRcwxJC+e7ENJeJutyBwHjJk+mt6lGuewRUEnrQxkZIgbgA+SJ7WzKzpH9XHhdAoIBACz9H4NdITK6bdnOnXhAhPB69XzTRxfQGNWnXJGRYyMi9ZzlF410vKZ55CodEV4hHhuikyEShDZ61Dn+2f03S3+2d8h4rgUDQJKDTdEkujq8N6rdV2dglIVmDW3SAsaKBnz92gtnBqvfmtwycYbtKTZLDThaviGsVPLvFxDBbfyCbVt4Cb5juyY2vT+U53XGjE9wyp44x4rWYPtESn+FqIUwcRaC0HxAdAWcmShS+d0ydaqgYFWmJ72leKdt7lsZ5kFJUNp+lr99qzjmexTZjneTGRVqPGAIZ4FnGlnGWSYN1Lyxn51k+YYiLseIM5qoiAiSereOECIPNOPGKni9qBY=",
"KeyType": "4096"
},
"Certificates": null
}
}
233 changes: 124 additions & 109 deletions mariadb-init/databases.sql

Large diffs are not rendered by default.

Loading

0 comments on commit 4a80518

Please sign in to comment.