Created
October 7, 2022 11:33
-
-
Save stefanpejcic/0b4faa009e71000413dad63fc92d9623 to your computer and use it in GitHub Desktop.
wordpress docker-compose-yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
db-annart: | |
# We use a mariadb image which supports both amd64 & arm64 architecture | |
image: mariadb:10.6.4-focal | |
# If you really want to use MySQL, uncomment the following line | |
#image: mysql:8.0.27 | |
command: '--default-authentication-plugin=mysql_native_password' | |
volumes: | |
- ./db_data:/var/lib/mysql | |
restart: always | |
networks: | |
- dz-net | |
environment: | |
- MYSQL_ROOT_PASSWORD=somewordpress | |
- MYSQL_DATABASE=wordpress | |
- MYSQL_USER=wordpress | |
- MYSQL_PASSWORD=wordpress | |
# expose: | |
# - 3306 | |
# - 33060 | |
wordpress-sajt: | |
image: wordpress:latest | |
# ports: | |
# - 81:80 | |
volumes: | |
- ./wp_data/html:/var/www/html | |
restart: always | |
networks: | |
- dz-net | |
environment: | |
- WORDPRESS_DB_HOST=db-sajt | |
- WORDPRESS_DB_USER=wordpress | |
- WORDPRESS_DB_PASSWORD=wordpress | |
- WORDPRESS_DB_NAME=wordpress | |
networks: | |
dz-net: | |
external: true | |
default: | |
driver: bridge |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment