Skip to content

Instantly share code, notes, and snippets.

@tommymcgahee
Created March 19, 2021 01:38
Show Gist options
  • Save tommymcgahee/af8c83ca7c96c0d6377ccf75b46c978a to your computer and use it in GitHub Desktop.
Save tommymcgahee/af8c83ca7c96c0d6377ccf75b46c978a to your computer and use it in GitHub Desktop.
version: '3.6'
services:
tailwindcss:
container_name: ddev-${DDEV_SITENAME}-tailwindcss-postcss
image: node:15.7
user: "node"
restart: "no"
environment:
- "TAILWIND_MODE=watch"
labels:
com.ddev.site-name: ${DDEV_SITENAME}
com.ddev.platform: ddev
com.ddev.app-type: php
com.ddev.approot: $DDEV_APPROOT
volumes:
- "../:/var/www/html:cached"
working_dir: /var/www/html/tailwindcss
stdin_open: true
command: ["npm", "run", "watch"]
web:
# ports are a list of exposed *container* ports
expose:
- "3000"
environment:
- HTTP_EXPOSE=${DDEV_ROUTER_HTTP_PORT}:80,${DDEV_MAILHOG_PORT}:8025,3001:3000
- HTTPS_EXPOSE=${DDEV_ROUTER_HTTPS_PORT}:80,${DDEV_MAILHOG_HTTPS_PORT}:8025,3000:3000
browsersync:
container_name: ddev-${DDEV_SITENAME}-browsersync
image: node:15.7
user: "node"
restart: "no"
labels:
com.ddev.site-name: ${DDEV_SITENAME}
com.ddev.platform: ddev
com.ddev.app-type: php
com.ddev.approot: $DDEV_APPROOT
volumes:
- "../:/var/www/html:cached"
working_dir: /var/www/html/tailwindcss
command: ["npm", "run", "sync"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment