Skip to content

Instantly share code, notes, and snippets.

@stefanpejcic
Created October 7, 2022 11:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stefanpejcic/0b4faa009e71000413dad63fc92d9623 to your computer and use it in GitHub Desktop.
Save stefanpejcic/0b4faa009e71000413dad63fc92d9623 to your computer and use it in GitHub Desktop.
wordpress docker-compose-yml
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