Skip to content
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

88 webpacker on docker compose #89

Merged
merged 4 commits into from
Apr 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .env.dev.docker.compose
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,8 @@ REDIS_CLIENT_URL=redis://redis:6379/0

WEB_TITLE=CW-OVP
WEB_LOGO_URL=https://raw.githubusercontent.com/x1wins/CW-OVP/master/app/assets/images/CW_OVP_LOGO_200x200.png

RAILS_ENV=development
NODE_ENV=development
WEBPACKER_DEV_SERVER_HOST=webpacker
WEBPACKER_DEV_SERVER_PORT=3035
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ RUN mkdir /myapp
RUN mkdir /storage
WORKDIR /myapp
COPY . /myapp
RUN gem update --system
RUN bundle check || bundle install --jobs 4
RUN yarn install --check-files
RUN gem update --system \
&& bundle check || bundle install --jobs 4 \
&& yarn install --check-files

ARG RAILS_MASTER_KEY
RUN if [ "$RAILS_MASTER_KEY" ] ; then RAILS_MASTER_KEY=${RAILS_MASTER_KEY} RAILS_ENV=production bundle exec rails assets:precompile ; fi
Expand Down
14 changes: 14 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,20 @@ services:
ports: []
depends_on:
- web
webpacker:
<<: *app_base
command: ./bin/webpack-dev-server < echo 'y'
env_file:
- .env.dev.docker.compose
- .env.dev.s3
volumes:
- .:/myapp
environment:
WEBPACKER_DEV_SERVER_HOST: 0.0.0.0
tty: false
stdin_open: false
ports:
- '3035:3035'
networks:
cw_ovp_network:
driver: bridge
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
"@rails/activestorage": "^6.1.4-1",
"@rails/ujs": "^6.1.4-1",
"@rails/webpacker": "5.4.2",
"webpack": "^4.46.0",
"webpack-cli": "^3.3.12",
"@videojs/themes": "^1.0.1",
"animate.css": "^4.1.1",
"bulma": "^0.9.3",
Expand All @@ -17,6 +19,6 @@
},
"version": "0.1.0",
"devDependencies": {
"webpack-dev-server": "^4.0.0"
"webpack-dev-server": "3.11.2"
}
}
Loading