Added Docker container and compose definitions to make development easier
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
services:
|
||||
app:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.dev
|
||||
command: make run BUILD_DIR=/tmp
|
||||
ports:
|
||||
- "2830:2830"
|
||||
volumes:
|
||||
- .:/app # Mounts local directory for hot-reloading/live edits
|
||||
- go-modules:/go/pkg/mod # Caches Go modules on host
|
||||
# Mount the compiled static assets generated by Grunt
|
||||
- static-assets:/app/public
|
||||
environment:
|
||||
- APP_ENV=development
|
||||
assets:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.grunt
|
||||
# Override CMD to run watch mode during local dev
|
||||
command: npm run grunt watch
|
||||
volumes:
|
||||
# Mount host code so Grunt detects file changes in real time
|
||||
- .:/var/www/html
|
||||
# Preserve container node_modules from being overwritten by host
|
||||
- /var/www/html/node_modules
|
||||
# Output compiled assets into the shared volume
|
||||
- static-assets:/var/www/html/public
|
||||
|
||||
volumes:
|
||||
go-modules:
|
||||
static-assets:
|
||||
Reference in New Issue
Block a user