Skip to content

Commit 50b961f

Browse files
Create docker-compose file.
1 parent d421de8 commit 50b961f

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

docker-compose.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
version: '3.3'
2+
3+
services:
4+
5+
letsencrypt:
6+
image: linuxserver/letsencrypt
7+
container_name: letsencrypt
8+
depends_on:
9+
- wordpress
10+
volumes:
11+
- ./config:/config
12+
- ./default:/config/nginx/site-confs/default
13+
environment:
14+
- EMAIL=email@example.com
15+
- URL=www.example.com
16+
- VALIDATION=http
17+
- TZ=Europe/London
18+
- PUID=500
19+
- PGID=500
20+
ports:
21+
- "443:443"
22+
- "80:80"
23+
24+
wordpress:
25+
image: wordpress:latest
26+
container_name: wordpress
27+
hostname: wordpress
28+
depends_on:
29+
- db
30+
restart: always
31+
ports:
32+
- "8080:80"
33+
volumes:
34+
- /var/www/html/example/wp-content:/var/www/html/wp-content
35+
- /var/www/html/example/custom.ini:/usr/local/etc/php/conf.d/custom.ini
36+
environment:
37+
WORDPRESS_DB_HOST: db
38+
WORDPRESS_DB_USER: wp_db_user
39+
WORDPRESS_DB_PASSWORD: wp_db_pass
40+
WORDPRESS_DB_NAME: wp_db_name
41+
WORDPRESS_CONFIG_EXTRA: |
42+
define( 'WP_MEMORY_LIMIT', '96M' );
43+
44+
db:
45+
image: mysql:5.7
46+
container_name: db
47+
volumes:
48+
- /var/lib/mysql:/var/lib/mysql
49+
restart: always
50+
ports:
51+
- "3306:3306"
52+
environment:
53+
MYSQL_ROOT_PASSWORD: mysql_root_pass
54+
MYSQL_DATABASE: mysql_db
55+
MYSQL_USER: mysql_user
56+
MYSQL_PASSWORD: mysql_pass

0 commit comments

Comments
 (0)