Skip to content

Instantly share code, notes, and snippets.

@shijiezhou1
Created July 5, 2020 09:48
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 shijiezhou1/6eab160669d94436ca62f6e2a91f057e to your computer and use it in GitHub Desktop.
Save shijiezhou1/6eab160669d94436ca62f6e2a91f057e to your computer and use it in GitHub Desktop.
Oracle with WordPress Docker compose
version: '3.7'
services:
wordpress:
image: wordpress
container_name: wp
restart: always
ports:
- 8080:80
- 8443:443
environment:
WORDPRESS_DB_HOST: db
WORDPRESS_DB_USER: exampleuser
WORDPRESS_DB_PASSWORD: examplepass
WORDPRESS_DB_NAME: exampledb
volumes:
- wordpress:/var/www/html:rw
db:
image: mysql:5.7
container_name: mysql
restart: always
environment:
MYSQL_DATABASE: exampledb
MYSQL_USER: exampleuser
MYSQL_PASSWORD: examplepass
MYSQL_RANDOM_ROOT_PASSWORD: '1'
volumes:
- db:/var/lib/mysql
nginx:
image: nginx:latest
container_name: ngx
restart: always
ports:
- 80:80
- 443:443
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./nginx/conf.d:/etc/nginx/conf.d
volumes:
wordpress:
db:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment