Skip to content

Instantly share code, notes, and snippets.

@gjuoun
Last active March 6, 2022 06:24
Show Gist options
  • Save gjuoun/2a50f2eeaf1d23a7fc78e4abd7591284 to your computer and use it in GitHub Desktop.
Save gjuoun/2a50f2eeaf1d23a7fc78e4abd7591284 to your computer and use it in GitHub Desktop.
Dockerfiles
version: '3.1'
services:
wordpress:
image: wordpress:5.3.2-php7.2-apache
restart: always
ports:
- 8080:80
environment:
WORDPRESS_DB_HOST: db
WORDPRESS_DB_USER: root
WORDPRESS_DB_PASSWORD: [MYSQL_ROOT_PASSWORD]
WORDPRESS_DB_NAME: [MYSQL_DATABASE]
volumes:
- wordpress:/var/www/html
db:
image: mysql:5.7
restart: always
environment:
MYSQL_DATABASE: <db_name>
MYSQL_USER: root
MYSQL_ROOT_PASSWORD: <db_password>
volumes:
- db:/var/lib/mysql
volumes:
wordpress:
db:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment