-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose-dev.yml
More file actions
118 lines (111 loc) · 3.55 KB
/
docker-compose-dev.yml
File metadata and controls
118 lines (111 loc) · 3.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
version: '3.7'
services:
# NGINX Server-------------------------------------------------------------------------
nginx:
image: nginx:1.25.3-alpine
container_name: nginx
restart: unless-stopped
depends_on:
- wordpress
ports:
- "80:80"
# - "8282:8282"
volumes:
- ./wordpress:/var/www/html
# - ./index.html:/var/www/html/index.html
# - ./docker/nginx-blog-samplr-io.conf:/etc/nginx/conf.d/default.conf
- ./docker/nginx-local.conf:/etc/nginx/conf.d/default.conf
# - certbot-etc:/etc/letsencrypt
networks:
- docker-wp-net
# MySQL Database -------------------------------------------------------------------
db:
image: mysql:8.0
container_name: db
restart: unless-stopped
env_file: .env
environment:
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
volumes:
- ./db-data:/var/lib/mysql
command: '--default-authentication-plugin=mysql_native_password'
ports:
- "3306:3306"
networks:
- docker-wp-net
# Wordpress Application --------------------------------------------------------------
wordpress:
container_name: wordpress
build:
context: .
dockerfile: Dockerfile
# image: kozmozio/wordpress:6.4.3
# image: wordpress:6.4.3-php8.2-fpm-alpine
restart: unless-stopped
env_file: .env
depends_on:
- db
environment:
PROJECT: ${NAMESPACE}
BUILD_TAG: ${BUILD_TAG}
BUILD_NUMBER: ${BUILD_NUMBER}
WORDPRESS_DB_HOST: ${WORDPRESS_DB_HOST}
WORDPRESS_DB_USER: ${WORDPRESS_DB_USER}
WORDPRESS_DB_PASSWORD: ${WORDPRESS_DB_PASSWORD}
WORDPRESS_DB_NAME: ${WORDPRESS_DB_NAME}
volumes:
- ./wordpress:/var/www/html/
- ./themes:/var/www/html/wp-content/themes
- ./plugins:/var/www/html/wp-content/plugins
- ./uploads:/var/www/html/wp-content/uploads
networks:
- docker-wp-net
ports:
- "9001:9000"
# PhpMyAdmin -------------------------------------------------------------------------
# phpmyadmin:
# image: phpmyadmin:5.2.1
# container_name: phpmyadmin
# restart: unless-stopped
# depends_on:
# - db
# # ports:
# # - "8000:8000"
# env_file: .env
# environment:
# PMA_HOST: db
# MYSQL_ROOT_PASSWORD: $MYSQL_ROOT_PASSWORD
# MYSQL_USER: $MYSQL_USER
# MYSQL_PASSWORD: $MYSQL_PASSWORD
# PMA_USER: ${PMA_USER}
# PMA_PASSWORD: ${PMA_PASSWORD}
# PMA_CONTROLHOST: pmadocker.local
# networks:
# - docker-wp-net
# extra_hosts:
# - "pmadocker.local:192.168.32.3"
# Certbot ----------------------------------------------------------------------------
# certbot:
# depends_on:
# - nginx
# image: certbot/certbot
# container_name: certbot
# volumes:
# - certbot-etc:/etc/letsencrypt
# - wordpress:/var/www/html
# command: certonly --webroot --webroot-path=/var/www/html --email hello@samplr.io --agree-tos --no-eff-email --staging -d blog.samplr.io -d blog.samplr.io
# Volumes ----------------------------------------------------------------------------
volumes:
# certbot-etc:
wordpress:
themes:
plugins:
uploads:
db-data:
# Networks ----------------------------------------------------------------------------
networks:
docker-wp-net:
driver: bridge