Skip to content

Instantly share code, notes, and snippets.

@javierojeda94
Last active April 7, 2019 20:33
Show Gist options
  • Save javierojeda94/048db683b5fe207b16becaa981a6f21f to your computer and use it in GitHub Desktop.
Save javierojeda94/048db683b5fe207b16becaa981a6f21f to your computer and use it in GitHub Desktop.
Docker config to start using roots/sage
version: '3.1'
services:
wordpress:
build: .
container_name: wordpress
restart: always
volumes:
- ./wordpress:/var/www/html
ports:
- 8080:80
- 3000:3000
- 3001:3001
environment:
WORDPRESS_DB_HOST: db
WORDPRESS_DB_USER: dbuser
WORDPRESS_DB_PASSWORD: dbpassword
WORDPRESS_DB_NAME: dbname
db:
container_name: db
image: mysql:5.7
restart: always
volumes:
- ./db:/var/lib/mysql
environment:
MYSQL_DATABASE: dbname
MYSQL_USER: dbuser
MYSQL_PASSWORD: dbpassword
MYSQL_RANDOM_ROOT_PASSWORD: '1'
FROM wordpress:5.1-php7.1-apache
RUN apt-get update
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
RUN curl -sL https://deb.nodesource.com/setup_11.x | bash -
RUN apt-get install -y nodejs gnupg
RUN npm install -g yarn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment