-
-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to use webpack-encore in docker container? #366
Comments
Hi @powerlimit, Could you detail a bit more what you are trying to achieve and the issue(s) you are having? As far as I know any container with Node.js + Yarn/npm should work fine with Encore. |
``FROM php:7.2-fpm-alpine ENV VERSION=v4.9.1 NPM_VERSION=2ENV VERSION=v6.14.3 NPM_VERSION=3ENV VERSION=v8.11.3 NPM_VERSION=5 YARN_VERSION=latestENV VERSION=v10.7.0 NPM_VERSION=6 YARN_VERSION=latest WORKDIR /var/www/stf For base buildsENV CONFIG_FLAGS="--fully-static --without-npm" DEL_PKGS="libstdc++" RM_DIRS=/usr/includeRUN apk add --no-cache curl make gcc g++ python linux-headers binutils-gold gnupg libstdc++ && COPY docker-entrypoint.sh /usr/local/bin here is my dockerfile ``#!/bin/bash exec "yarn run encore dev --watch"`` and here is entrypoint. it does not work. after creating container i want encore to watch changes in scss and js files. can you help? |
Put a version: "3"
services:
app:
image: php:7.2-alpine
volumes:
- .:/app
ports:
- "${APP_PORT:-8000}:8000"
working_dir: /app
command: ["bin/console", "server:run", "0.0.0.0"]
encore:
image: node:10-alpine
volumes:
- .:/app
ports:
- "${DEV_SERVER_PORT:-8080}:8080"
working_dir: /app
command: ["yarn", "dev-server", "--host=0.0.0.0"] To start your Symfony app + Encore dev server:
To stop your Symfony app + Encore dev server:
To build your assets for production:
|
maybe this is the problem: btw:
this runs yarn install even when everything is installed but not yet build with webpack. But when yarn has installed, it returns rather quickly. So just skip the if |
No description provided.
The text was updated successfully, but these errors were encountered: