Linux iad1-shared-b7-18 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
Apache
: 67.205.6.31 | : 216.73.216.20
Cant Read [ /etc/named.conf ]
8.2.29
fernandoquevedo
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
share /
doc /
ruby-webpacker /
[ HOME SHELL ]
Name
Size
Permission
Action
README.md.gz
7.38
KB
-rw-r--r--
assets.md
3.09
KB
-rw-r--r--
changelog.Debian.gz
643
B
-rw-r--r--
cloud9.md.gz
4.06
KB
-rw-r--r--
copyright
1.44
KB
-rw-r--r--
css.md.gz
2.4
KB
-rw-r--r--
deployment.md.gz
2.2
KB
-rw-r--r--
docker.md
1.56
KB
-rw-r--r--
engines.md.gz
2.19
KB
-rw-r--r--
env.md
1.93
KB
-rw-r--r--
es6.md
2.8
KB
-rw-r--r--
folder-structure.md
1.26
KB
-rw-r--r--
misc.md
470
B
-rw-r--r--
props.md.gz
1.73
KB
-rw-r--r--
testing.md.gz
1.84
KB
-rw-r--r--
troubleshooting.md.gz
2.69
KB
-rw-r--r--
typescript.md
2.64
KB
-rw-r--r--
v4-upgrade.md.gz
2.82
KB
-rw-r--r--
webpack-dev-server.md
2.85
KB
-rw-r--r--
webpack.md.gz
3.75
KB
-rw-r--r--
yarn.md
789
B
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : docker.md
# Docker To setup webpacker with a dockerized Rails application is trivial. First, add a new service for webpacker in docker-compose.yml: ```Dockerfile version: '3' services: webpacker: build: . env_file: - '.env.docker' command: ./bin/webpack-dev-server volumes: - .:/webpacker-example-app ports: - '3035:3035' ``` Second, change the webpack-dev-server host to the service name of the docker-compose in config/webpacker.yml: ```yaml development: <<: *default dev_server: host: webpacker ``` add nodejs and yarn as dependencies in Dockerfile, ```dockerfile FROM ruby:2.4.1 RUN apt-get update -qq && apt-get install -y build-essential nodejs \ && rm -rf /var/lib/apt/lists/* \ && curl -o- -L https://yarnpkg.com/install.sh | bash # Rest of the commands.... ``` Please note: if using `assets:precompile` in the Dockerfile or have issues with the snippet above then try: ```dockerfile FROM ruby:2.4.1 RUN curl -sL https://deb.nodesource.com/setup_8.x | bash \ && apt-get update && apt-get install -y nodejs && rm -rf /var/lib/apt/lists/* \ && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ && apt-get update && apt-get install -y yarn && rm -rf /var/lib/apt/lists/* # Rest of the commands.... ``` and create an env file to load environment variables from: ```env NODE_ENV=development RAILS_ENV=development WEBPACKER_DEV_SERVER_HOST=0.0.0.0 ``` Lastly, rebuild your container: ```bash docker-compose up --build ```
Close