When I start my server with docker-compose up rails command, there is shows a [Webpacker] Compiling... which goes for about a ten seconds and then it gives this output
rails_1 | [Webpacker] Compilation failed:
rails_1 | Hash: e1d0cde8c28f1ff2a0a2
rails_1 | Version: webpack 4.46.0
rails_1 | Time: 19214ms
rails_1 | Built at: 03/17/2022 11:42:08 AM
rails_1 | Asset Size Chunks Chunk Names
rails_1 | js/application-e9da3e13d93a6c1058bd.js 5.54 MiB application [emitted] [immutable] application
rails_1 | js/application-e9da3e13d93a6c1058bd.js.map 5.14 MiB application [emitted] [dev] application
rails_1 | js/board-48bc7b5cbf760044039a.js 3.77 MiB board [emitted] [immutable] board
rails_1 | js/board-48bc7b5cbf760044039a.js.map 3.88 MiB board [emitted] [dev] board
rails_1 | js/provider-c2471a0d3965537a7a3f.js 3.74 MiB provider [emitted] [immutable] provider
rails_1 | js/provider-c2471a0d3965537a7a3f.js.map 3.85 MiB provider [emitted] [dev] provider
rails_1 | js/server_rendering-a1f5869b9a9be21b0a76.js 9.15 MiB server_rendering [emitted] [immutable] server_rendering
rails_1 | js/server_rendering-a1f5869b9a9be21b0a76.js.map 8.51 MiB server_rendering [emitted] [dev] server_rendering
rails_1 | manifest.json 1.61 KiB [emitted]
rails_1 | media/fonts/OpenSans-Regular-d7d7b8359eeb9cddfba6cd4cef3c1702.ttf 127 KiB [emitted]
rails_1 | media/fonts/OpenSans-SemiBold-d7261533b9a545ddc769dc2fe86dc40e.ttf 127 KiB [emitted]
rails_1 | media/images/logo-cfbdadde.png 1.07 KiB [emitted]
rails_1 | Entrypoint application = js/application-e9da3e13d93a6c1058bd.js js/application-e9da3e13d93a6c1058bd.js.map
rails_1 | Entrypoint board = js/board-48bc7b5cbf760044039a.js js/board-48bc7b5cbf760044039a.js.map
rails_1 | Entrypoint provider = js/provider-c2471a0d3965537a7a3f.js js/provider-c2471a0d3965537a7a3f.js.map
rails_1 | Entrypoint server_rendering = js/server_rendering-a1f5869b9a9be21b0a76.js js/server_rendering-a1f5869b9a9be21b0a76.js.map
rails_1 | [./app/assets/images/logo.png] 76 bytes {application} {server_rendering} [built]
rails_1 | [./app/javascript/components sync recursive ^\.\/.*$] ./app/javascript/components sync ^\.\/.*$ 9.05 KiB {server_rendering} [built]
rails_1 | [./app/javascript/components/app.tsx] 5.63 KiB {application} {server_rendering} [built]
rails_1 | [./app/javascript/components/provider/index.js] 49 bytes {provider} {server_rendering} [built]
rails_1 | [./app/javascript/components/subscription/index.js] 62 bytes {board} {server_rendering} [built]
rails_1 | [./app/javascript/packs/application.js] 1.71 KiB {application} [built]
rails_1 | [./app/javascript/packs/board.jsx] 1.13 KiB {board} [built]
rails_1 | [./app/javascript/packs/provider.js] 381 bytes {provider} [built]
rails_1 | [./app/javascript/packs/server_rendering.js] 301 bytes {server_rendering} [built]
rails_1 | [./app/javascript/utils/apollo.js] 5.34 KiB {board} {provider} {server_rendering} [built]
rails_1 | [./node_modules/react-apollo/lib/react-apollo.esm.js] 487 bytes {board} {provider} {server_rendering} [built]
rails_1 | [./node_modules/react-dom/index.js] 1.32 KiB {application} {board} {provider} {server_rendering} [built]
rails_1 | [./node_modules/react-router-dom/index.js] 15.2 KiB {application} {server_rendering} [built]
rails_1 | [./node_modules/react/index.js] 189 bytes {application} {board} {provider} {server_rendering} [built]
rails_1 | [./node_modules/react_ujs/react_ujs/index.js] 6.3 KiB {server_rendering} [built]
rails_1 | + 1550 hidden modules
rails_1 |
rails_1 | WARNING in ./node_modules/graphql-ruby-client/sync/prepareRelay.js 41:22-47
rails_1 | Critical dependency: the request of a dependency is an expression
rails_1 | # ./node_modules/graphql-ruby-client/sync/generateClient.js
rails_1 | # ./node_modules/graphql-ruby-client/index.js
rails_1 | # ./app/javascript/utils/apollo.js
rails_1 | # ./app/javascript/packs/board.jsx
rails_1 |
rails_1 | ERROR in ./app/javascript/components/action-item/action-item.jsx 303:13-28
rails_1 | "export 'handleKeyPress' (imported as '_handleKeyPress') was not found in '../../utils/helpers'
rails_1 | # ./app/javascript/components sync ^\.\/.*$
rails_1 | # ./app/javascript/packs/server_rendering.js
rails_1 |
rails_1 | ERROR in ./app/javascript/components/new-action-item/new-action-item.jsx 141:13-28
rails_1 | "export 'handleKeyPress' (imported as '_handleKeyPress') was not found in '../../utils/helpers'
rails_1 | # ./app/javascript/components sync ^\.\/.*$
rails_1 | # ./app/javascript/packs/server_rendering.js
rails_1 |
rails_1 | ERROR in ./app/javascript/components/new-card-body/new-card-body.jsx 188:13-27
rails_1 | "export 'handleKeyPress' was not found in '../../utils/helpers'
rails_1 | # ./app/javascript/components sync ^\.\/.*$
rails_1 | # ./app/javascript/packs/server_rendering.js
rails_1 |
rails_1 | ERROR in ./app/javascript/components/comments-dropdown/comments-dropdown.jsx 181:13-27
rails_1 | "export 'handleKeyPress' was not found in '../../utils/helpers'
rails_1 | # ./app/javascript/components sync ^\.\/.*$
rails_1 | # ./app/javascript/packs/server_rendering.js
rails_1 |
rails_1 | ERROR in ./app/javascript/components/card-body/card-body.jsx 222:13-27
rails_1 | "export 'handleKeyPress' was not found in '../../utils/helpers'
rails_1 | # ./app/javascript/components sync ^\.\/.*$
rails_1 | # ./app/javascript/packs/server_rendering.js
rails_1 |
rails_1 | ERROR in ./node_modules/graphql-ruby-client/subscriptions/ActionCableLink.js
rails_1 | Module not found: Error: Can't resolve '#apollo/client/core' in '/app/node_modules/graphql-ruby-client/subscriptions'
rails_1 | # ./node_modules/graphql-ruby-client/subscriptions/ActionCableLink.js 33:13-43
rails_1 | # ./node_modules/graphql-ruby-client/index.js
rails_1 | # ./app/javascript/utils/apollo.js
rails_1 | # ./app/javascript/packs/board.jsx
rails_1 |
rails_1 | ERROR in ./node_modules/graphql-ruby-client/subscriptions/PusherLink.js
rails_1 | Module not found: Error: Can't resolve '#apollo/client/core' in '/app/node_modules/graphql-ruby-client/subscriptions'
rails_1 | # ./node_modules/graphql-ruby-client/subscriptions/PusherLink.js 68:13-43
rails_1 | # ./node_modules/graphql-ruby-client/index.js
rails_1 | # ./app/javascript/utils/apollo.js
rails_1 | # ./app/javascript/packs/board.jsx
rails_1 |
rails_1 | ERROR in ./node_modules/graphql-ruby-client/subscriptions/AblyLink.js
rails_1 | Module not found: Error: Can't resolve '#apollo/client/core' in '/app/node_modules/graphql-ruby-client/subscriptions'
rails_1 | # ./node_modules/graphql-ruby-client/subscriptions/AblyLink.js 70:13-43
rails_1 | # ./node_modules/graphql-ruby-client/index.js
rails_1 | # ./app/javascript/utils/apollo.js
rails_1 | # ./app/javascript/packs/board.jsx
rails_1 |
rails_1 | ERROR in ./node_modules/graphql-ruby-client/subscriptions/createRelaySubscriptionHandler.js
rails_1 | Module not found: Error: Can't resolve 'relay-runtime' in '/app/node_modules/graphql-ruby-client/subscriptions'
rails_1 | # ./node_modules/graphql-ruby-client/subscriptions/createRelaySubscriptionHandler.js 14:22-46
rails_1 | # ./node_modules/graphql-ruby-client/index.js
rails_1 | # ./app/javascript/utils/apollo.js
rails_1 | # ./app/javascript/packs/board.jsx
I found that answer that helps me a bit. But now, when I start ./bin/webpack-dev-server in a separate window, it gives me this
./bin/webpack-dev-server
<i> [webpack-dev-server] Project is running at:
<i> [webpack-dev-server] Loopback: http://localhost:8080/
<i> [webpack-dev-server] On Your Network (IPv4): http://192.168.0.13:8080/
<i> [webpack-dev-server] On Your Network (IPv6): http://[fe80::b537:10:b5dc:9bb5]:8080/
<i> [webpack-dev-server] Content not from webpack is served from '/home/yarikhrom/Work/retrospective/retrospective/public' directory
node:internal/crypto/hash:67
this[kHandle] = new _Hash(algorithm, xofLen);
^
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:67:19)
at Object.createHash (node:crypto:135:10)
at module.exports (/home/yarikhrom/Work/retrospective/retrospective/node_modules/webpack/lib/util/createHash.js:135:53)
at NormalModule._initBuildHash (/home/yarikhrom/Work/retrospective/retrospective/node_modules/webpack/lib/NormalModule.js:417:16)
at handleParseError (/home/yarikhrom/Work/retrospective/retrospective/node_modules/webpack/lib/NormalModule.js:471:10)
at /home/yarikhrom/Work/retrospective/retrospective/node_modules/webpack/lib/NormalModule.js:503:5
at /home/yarikhrom/Work/retrospective/retrospective/node_modules/webpack/lib/NormalModule.js:358:12
at /home/yarikhrom/Work/retrospective/retrospective/node_modules/loader-runner/lib/LoaderRunner.js:373:3
at iterateNormalLoaders (/home/yarikhrom/Work/retrospective/retrospective/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
at iterateNormalLoaders (/home/yarikhrom/Work/retrospective/retrospective/node_modules/loader-runner/lib/LoaderRunner.js:221:10) {
opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
library: 'digital envelope routines',
reason: 'unsupported',
code: 'ERR_OSSL_EVP_UNSUPPORTED'
}
Node.js v17.7.1
Also i found in documentation that I need to work with file webpack.config.js, but I don't have this one in my project. So, what can I do to make my webpacker compile insantly when I start a project or making changes in a frontend part?
docker-compose.yml:
version: "3.7"
services:
app: &app
build:
context: .
dockerfile: ./.dockerdev/Dockerfile
args:
RUBY_VERSION: "2.7.0"
PG_MAJOR: "11"
NODE_MAJOR: "12"
YARN_VERSION: "1.19.1"
BUNDLER_VERSION: "2.2.25"
image: example-dev:1.0.0
tmpfs:
- /tmp
backend: &backend
<<: *app
stdin_open: true
tty: true
volumes:
- .:/app:cached
- ./node_modules:/app/node_modules
- .dockerdev/.psqlrc:/root/.psqlrc:ro
- .dockerdev/bundle:/bundle
- rails_cache:/app/tmp/cache
- packs:/app/public/packs
environment:
- NODE_ENV=development
- RAILS_ENV=${RAILS_ENV:-development}
- REDIS_URL=redis://redis:6379/
- DATABASE_URL=postgres://postgres:postgres#postgres:5432
- POSTGRESQL_HOST=postgres
- POSTGRESQL_PORT=5432
- WEBPACKER_DEV_SERVER_HOST=webpacker
- WEB_CONCURRENCY=1
- HISTFILE=/app/log/.bash_history
- PSQL_HISTFILE=/app/log/.psql_history
- EDITOR=vi
depends_on:
- postgres
- redis
runner:
<<: *backend
command: /bin/bash
ports:
- "3000:3000"
- "3002:3002"
rails:
<<: *backend
command: bundle exec rails server -b 0.0.0.0
ports:
- "3000:3000"
postgres:
image: postgres:11.1
volumes:
- .dockerdev/.psqlrc:/root/.psqlrc:ro
- ./log:/root/log:cached
- postgres:/var/lib/postgresql/data
environment:
- PSQL_HISTFILE=/root/log/.psql_history
ports:
- "5432:5432"
redis:
image: redis:3.2-alpine
volumes:
- redis:/data
ports:
- "6379:6379"
webpacker:
<<: *app
command: ./bin/webpack-dev-server
ports:
- "3035:3035"
volumes:
- .:/app:cached
- ./node_modules:/app/node_modules
- .dockerdev/bundle:/bundle
- packs:/app/public/packs
environment:
- NODE_ENV=${NODE_ENV:-development}
- RAILS_ENV=${RAILS_ENV:-development}
- WEBPACKER_DEV_SERVER_HOST=0.0.0.0
volumes:
postgres:
redis:
node_modules:
rails_cache:
packs:
I think that i had this issue too, i fixed this putting rails and webpacker in the same container, is not the best solution but it works, something like this:
docker-compose.yml
version: '3'
services:
web:
build:
context: .
dockerfile: ./docker/development/Dockerfile
command: ["sh", "./docker/development/scripts/start-rails-development-server.sh"]
volumes:
- .:/app
ports:
- 3000:3000
- 3035:3035
depends_on:
- database
start-rails-development-server.sh
#!/bin/sh
echo 'Starting webpack dev server ...' && bin/webpack-dev-server &
echo 'starting Rails server ...' && rm -f tmp/pids/server.pid && bundle exec rails s -b 0.0.0.0
Related
I want to run a container based on python:3.8.8-slim-buster that needs access to the GPU.
When I build it from this Dockerfile:
FROM python:3.8.8-slim-buster
CMD ["sleep", "infinity"]
and then run it with "--gpus all" flag and exec nvidia-smi i get a proper response:
Sat Jun 19 12:26:57 2021
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 465.27 Driver Version: 465.27 CUDA Version: 11.3 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 NVIDIA GeForce ... Off | 00000000:01:00.0 Off | N/A |
| N/A 45C P8 N/A / N/A | 301MiB / 1878MiB | 14% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
+-----------------------------------------------------------------------------+
and when I use this docker-compose:
services:
test:
image: tensorflow/tensorflow:2.5.0-gpu
command: sleep infinity
deploy:
resources:
reservations:
devices:
- capabilities: [gpu]
and exec nvidia-smi after running it i get the same response.
But when i replace the image in the docker-compose to python:3.8.8-slim-buster like in the Dockerfile, i get this response:
OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "nvidia-smi": executable file not found in $PATH: unknown
I appreciate any help figuring this out.
I am trying to run the clara train example, but when I execute the startClaraTrainNoteBooks.sh, the container cannot find the nvidia driver.
I already know that the script executes docker-compose.yml. So I tested whether docker-compose can found the nvidia driver:
services:
test:
image: nvidia/cuda:10.2-base
command: nvidia-smi
deploy:
resources:
reservations:
devices:
- driver: nvidia
capabilities: [gpu]
device_ids: ['0']
Output:
USER#test:~$ docker-compose up
WARNING: Found orphan containers (hp_nvsmi_1) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.
Starting hp_test_1 ... done
Attaching to hp_test_1
test_1 | Mon Jun 7 09:01:44 2021
test_1 | +-----------------------------------------------------------------------------+
test_1 | | NVIDIA-SMI 460.27.04 Driver Version: 460.27.04 CUDA Version: 11.2 |
test_1 | |-------------------------------+----------------------+----------------------+
test_1 | | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
test_1 | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
test_1 | | | | MIG M. |
test_1 | |===============================+======================+======================|
test_1 | | 0 GeForce RTX 206... Off | 00000000:01:00.0 Off | N/A |
test_1 | | 0% 34C P8 17W / 215W | 100MiB / 7979MiB | 0% Default |
test_1 | | | | N/A |
test_1 | +-------------------------------+----------------------+----------------------+
test_1 |
test_1 | +-----------------------------------------------------------------------------+
test_1 | | Processes: |
test_1 | | GPU GI CI PID Type Process name GPU Memory |
test_1 | | ID ID Usage |
test_1 | |=============================================================================|
test_1 | +-----------------------------------------------------------------------------+
hp_test_1 exited with code 0
But the startClaraTrainNoteBooks.sh cna not find it.
root#claratrain:/claraDevDay# nvidia-smi
root#claratrain:/claraDevDay#
Actually, startDocker.sh can find the driver.
root#c7c2d5597eb8:/claraDevDay# nvidia-smi
Mon Jun 7 09:11:43 2021
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 460.27.04 Driver Version: 460.27.04 CUDA Version: 11.2 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 GeForce RTX 206... Off | 00000000:01:00.0 Off | N/A |
| 0% 35C P8 17W / 215W | 100MiB / 7979MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
+-----------------------------------------------------------------------------+
root#c7c2d5597eb8:/claraDevDay#
What should I do?
The docker-compose.yml script need to rewrite like this and working:
# SPDX-License-Identifier: Apache-2.0
version: "3.8"
services:
claratrain:
container_name: claradevday-pt
hostname: claratrain
##### use vanilla clara train docker
#image: nvcr.io/nvidia/clara-train-sdk:v4.0
##### to build image with GPU dashboard inside jupyter lab
build:
context: ./dockerWGPUDashboardPlugin/ # Project root
dockerfile: ./Dockerfile # Relative to context
image: clara-train-nvdashboard:v4.0
depends_on:
- tritonserver
ports:
- "3030:8888" # Jupyter lab port
- "3031:5000" # AIAA port
ipc: host
volumes:
- ${TRAIN_DEV_DAY_ROOT}:/claraDevDay/
- /raid/users/aharouni/data:/data/
command: "jupyter lab /claraDevDay --ip 0.0.0.0 --allow-root --no-browser --config /claraDevDay/scripts/jupyter_notebook_config.py"
# command: tail -f /dev/null
# tty: true
deploy:
resources:
reservations:
devices:
- driver: nvidia
capabilities: [ gpu ]
# To specify certain GPU uncomment line below
#device_ids: ['0,3']
#############################################################
tritonserver:
image: nvcr.io/nvidia/tritonserver:21.02-py3
container_name: aiaa-triton
hostname: tritonserver
restart: unless-stopped
command: >
sh -c "chmod 777 /triton_models &&
/opt/tritonserver/bin/tritonserver \
--model-store /triton_models \
--model-control-mode="poll" \
--repository-poll-secs=5 \
--log-verbose ${TRITON_VERBOSE}"
volumes:
- ${TRAIN_DEV_DAY_ROOT}/AIAA/workspace/triton_models:/triton_models
# shm_size: 1gb
# ulimits:
# memlock: -1
# stack: 67108864
# logging:
# driver: json-file
I'm currently working on "dockerizing" a Rails 6 app with MySQL as backend/admin-panel with an Angular 8 app as frontend for users. I tried to run both containers with docker-compose and the frontend works perfectly but the backend has a problem. The webpack server somehow cannot be started. It always tells me that the "webpack-dev-server" cannot be found and then exits. This is odd because I let the same setup run on a Linux/Ubuntu system and it works fine but on Mac the Webpacker fails.
This is my setup:
OS Catalina: 10.15.1
Node: 10.12.0
Ruby: 2.5.5
Dockerfile:
FROM ruby:2.5.5
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - && \
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list && \
apt-get update && \
apt-get install -qq -y \
build-essential nodejs yarn libpq-dev \
&& mkdir -p /app \
&& apt-get clean autoclean \
&& apt-get autoremove -y
WORKDIR /tmp
COPY Gemfile* /tmp/
RUN bundle install
COPY package* /tmp/
COPY yarn* /tmp/
RUN yarn install
ADD scripts/entrypoint.sh /usr/bin/
RUN chmod +x /usr/bin/entrypoint.sh
ENTRYPOINT ["entrypoint.sh"]
WORKDIR /app
COPY . /app
EXPOSE 3000
# Start the main process.
CMD ["rails", "server", "-b", "0.0.0.0"]
docker-compose.yml:
version: '3'
services:
backend:
build: ./backend
volumes:
- ./backend:/app
- ./backend/scripts:/scripts
ports:
- "3000:3000"
dns: # Needed for making request outside the container
- 1.1.1.1
command: ["/scripts/wait-for-it.sh", "db:3306", "--", "/scripts/wait-for-it.sh", "webpacker:3035", "--", "/scripts/start_rails.sh"]
depends_on:
- db
- webpacker
- frontend
environment:
DB_PASSWORD: root
DB_HOST: db
WEBPACKER_DEV_SERVER_HOST: webpacker # overwrites the webpacker.yml -> dev_server -> hosts value
db:
image: mariadb:10.4.10
volumes:
- ./volumes/mysql:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: root
webpacker:
build: ./backend
command: ["/app/bin/webpack-dev-server"]
volumes:
- ./backend:/app
ports:
- "3035:3035"
frontend: //This one works fine
build: ./frontend
volumes:
- ./frontend:/app
- ./frontend/node_modules:/app/node_modules
ports:
- '4200:4200'
webpacker.yml:
# Note: You must restart bin/webpack-dev-server for changes to take effect
default: &default
source_path: app/webpacker
source_entry_path: packs
public_root_path: public
public_output_path: packs
cache_path: tmp/cache/webpacker
check_yarn_integrity: false
webpack_compile_output: false
# Additional paths webpack should lookup modules
# ['app/assets', 'engine/foo/app/assets']
resolved_paths: []
# Reload manifest.json on all requests so we reload latest compiled packs
cache_manifest: false
# Extract and emit a css file
extract_css: true
static_assets_extensions:
- .jpg
- .jpeg
- .png
- .gif
- .tiff
- .ico
- .svg
- .eot
- .otf
- .ttf
- .woff
- .woff2
extensions:
- .mjs
- .js
- .sass
- .scss
- .css
- .module.sass
- .module.scss
- .module.css
- .png
- .svg
- .gif
- .jpeg
- .jpg
development:
<<: *default
compile: true
# Verifies that correct packages and versions are installed by inspecting package.json, yarn.lock, and node_modules
check_yarn_integrity: false
# Reference: https://webpack.js.org/configuration/dev-server/
dev_server:
https: false
host: 0.0.0.0
port: 3035
public: 0.0.0.0:3035
hmr: false
# Inline should be set to true if using HMR
inline: true
overlay: true
compress: true
disable_host_check: true
use_local_ip: false
quiet: false
headers:
'Access-Control-Allow-Origin': '*'
watch_options:
ignored: '**/node_modules/**'
test:
<<: *default
compile: true
# Compile test packs to a separate directory
public_output_path: packs-test
production:
<<: *default
# Production depends on precompilation of packs prior to booting for performance.
compile: false
# Extract and emit a css file
extract_css: true
# Cache manifest.json for performance
cache_manifest: true
Console output on "docker-compose up" (build works fine):
Creating network "lms_default" with the default driver
Creating lms_db_1 ... done
Creating lms_webpacker_1 ... done
Creating lms_frontend_1 ... done
Creating lms_backend_1 ... done
Attaching to lms_db_1, lms_frontend_1, lms_webpacker_1, lms_backend_1
frontend_1 | Your global Angular CLI version (8.3.23) is greater than your local
frontend_1 | version (8.1.3). The local Angular CLI version is used.
frontend_1 |
frontend_1 | To disable this warning use "ng config -g cli.warnings.versionMismatch false".
db_1 | 2020-01-28 12:11:25+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.4.10+maria~bionic started.
db_1 | 2020-01-28 12:11:26+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
db_1 | 2020-01-28 12:11:26+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.4.10+maria~bionic started.
backend_1 | wait-for-it.sh: waiting 15 seconds for db:3306
db_1 | 2020-01-28 12:11:26 0 [Note] mysqld (mysqld 10.4.10-MariaDB-1:10.4.10+maria~bionic) starting as process 1 ...
db_1 | 2020-01-28 12:11:26 0 [Note] InnoDB: Using Linux native AIO
db_1 | 2020-01-28 12:11:26 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
db_1 | 2020-01-28 12:11:26 0 [Note] InnoDB: Uses event mutexes
db_1 | 2020-01-28 12:11:26 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
db_1 | 2020-01-28 12:11:26 0 [Note] InnoDB: Number of pools: 1
db_1 | 2020-01-28 12:11:26 0 [Note] InnoDB: Using SSE2 crc32 instructions
db_1 | 2020-01-28 12:11:26 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
db_1 | 2020-01-28 12:11:26 0 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M
db_1 | 2020-01-28 12:11:27 0 [Note] InnoDB: Completed initialization of buffer pool
db_1 | 2020-01-28 12:11:27 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
db_1 | 2020-01-28 12:11:27 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
db_1 | 2020-01-28 12:11:27 0 [Note] InnoDB: Creating shared tablespace for temporary tables
db_1 | 2020-01-28 12:11:27 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
webpacker_1 | yarn run v1.21.1
webpacker_1 | error Command "webpack-dev-server" not found.
webpacker_1 | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
lms_webpacker_1 exited with code 1
db_1 | 2020-01-28 12:11:28 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
db_1 | 2020-01-28 12:11:28 0 [Note] InnoDB: 10.4.10 started; log sequence number 20282472; transaction id 14616
db_1 | 2020-01-28 12:11:28 0 [Note] Plugin 'FEEDBACK' is disabled.
db_1 | 2020-01-28 12:11:28 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
db_1 | 2020-01-28 12:11:28 0 [Note] Server socket created on IP: '::'.
db_1 | 2020-01-28 12:11:28 0 [Note] InnoDB: Buffer pool(s) load completed at 200128 12:11:28
db_1 | 2020-01-28 12:11:28 0 [Warning] 'proxies_priv' entry '#% root#c8d38e939209' ignored in --skip-name-resolve mode.
db_1 | 2020-01-28 12:11:28 0 [Note] Reading of all Master_info entries succeeded
db_1 | 2020-01-28 12:11:28 0 [Note] Added new Master_info '' to hash table
db_1 | 2020-01-28 12:11:28 0 [Note] mysqld: ready for connections.
db_1 | Version: '10.4.10-MariaDB-1:10.4.10+maria~bionic' socket: '/var/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution
db_1 | 2020-01-28 12:11:29 8 [Warning] Aborted connection 8 to db: 'unconnected' user: 'unauthenticated' host: '192.168.0.5' (This connection closed normally without authentication)
backend_1 | wait-for-it.sh: db:3306 is available after 3 seconds
backend_1 | wait-for-it.sh: waiting 15 seconds for webpacker:3035
frontend_1 | WARNING: This is a simple server for use in testing or debugging Angular applications
frontend_1 | locally. It hasn't been reviewed for security issues.
frontend_1 |
frontend_1 | Binding this server to an open connection can result in compromising your application or
frontend_1 | computer. Using a different host than the one passed to the "--host" flag might result in
frontend_1 | websocket connection issues. You might need to use "--disableHostCheck" if that's the
frontend_1 | case.
frontend_1 | ℹ 「wds」: Project is running at http://0.0.0.0:4200/webpack-dev-server/
frontend_1 | ℹ 「wds」: webpack output is served from /
frontend_1 | ℹ 「wds」: 404s will fallback to //index.html
backend_1 | wait-for-it.sh: timeout occurred after waiting 15 seconds for webpacker:3035
frontend_1 |
frontend_1 | chunk {0} 0.js, 0.js.map () 13.2 kB [rendered]
frontend_1 | chunk {1} 1.js, 1.js.map () 19.9 kB [rendered]
frontend_1 | chunk {2} 2.js, 2.js.map () 17 kB [rendered]
frontend_1 | chunk {3} 3.js, 3.js.map () 31 kB [rendered]
frontend_1 | chunk {4} 4.js, 4.js.map () 31.1 kB [rendered]
frontend_1 | chunk {5} 5.js, 5.js.map () 57.5 kB [rendered]
frontend_1 | chunk {6} 6.js, 6.js.map () 56.2 kB [rendered]
frontend_1 | chunk {7} 7.js, 7.js.map () 4.59 kB [rendered]
frontend_1 | chunk {8} 8.js, 8.js.map () 4.64 kB [rendered]
frontend_1 | chunk {9} 9.js, 9.js.map () 9.43 kB [rendered]
frontend_1 | chunk {10} 10.js, 10.js.map () 9.97 kB [rendered]
frontend_1 | chunk {11} 11.js, 11.js.map () 3.71 kB [rendered]
frontend_1 | chunk {12} 12.js, 12.js.map () 3.7 kB [rendered]
frontend_1 | chunk {13} 13.js, 13.js.map () 22.7 kB [rendered]
frontend_1 | chunk {14} 14.js, 14.js.map () 22.8 kB [rendered]
frontend_1 | chunk {15} 15.js, 15.js.map () 12 kB [rendered]
frontend_1 | chunk {16} 16.js, 16.js.map () 11.6 kB [rendered]
frontend_1 | chunk {17} 17.js, 17.js.map () 8.39 kB [rendered]
frontend_1 | chunk {18} 18.js, 18.js.map () 8.52 kB [rendered]
frontend_1 | chunk {19} 19.js, 19.js.map () 5.61 kB [rendered]
frontend_1 | chunk {20} 20.js, 20.js.map () 5.61 kB [rendered]
frontend_1 | chunk {21} 21.js, 21.js.map () 15.9 kB [rendered]
frontend_1 | chunk {22} 22.js, 22.js.map () 66.2 kB [rendered]
frontend_1 | chunk {23} 23.js, 23.js.map () 65.9 kB [rendered]
frontend_1 | chunk {24} 24.js, 24.js.map () 19 kB [rendered]
frontend_1 | chunk {25} 25.js, 25.js.map () 18.1 kB [rendered]
frontend_1 | chunk {26} 26.js, 26.js.map () 3.42 kB [rendered]
frontend_1 | chunk {27} 27.js, 27.js.map () 12.6 kB [rendered]
frontend_1 | chunk {28} 28.js, 28.js.map () 12.6 kB [rendered]
frontend_1 | chunk {29} 29.js, 29.js.map () 14.4 kB [rendered]
frontend_1 | chunk {30} 30.js, 30.js.map () 14.3 kB [rendered]
frontend_1 | chunk {31} 31.js, 31.js.map () 25.7 kB [rendered]
frontend_1 | chunk {32} 32.js, 32.js.map () 25.6 kB [rendered]
frontend_1 | chunk {33} 33.js, 33.js.map () 39.2 kB [rendered]
frontend_1 | chunk {34} 34.js, 34.js.map () 42.8 kB [rendered]
frontend_1 | chunk {35} 35.js, 35.js.map () 13.1 kB [rendered]
frontend_1 | chunk {36} 36.js, 36.js.map () 12.8 kB [rendered]
frontend_1 | chunk {37} 37.js, 37.js.map () 31.6 kB [rendered]
frontend_1 | chunk {38} 38.js, 38.js.map () 31.7 kB [rendered]
frontend_1 | chunk {39} 39.js, 39.js.map () 14.9 kB [rendered]
frontend_1 | chunk {40} 40.js, 40.js.map () 14.9 kB [rendered]
frontend_1 | chunk {41} 41.js, 41.js.map () 37.5 kB [rendered]
frontend_1 | chunk {42} 42.js, 42.js.map () 20.5 kB [rendered]
frontend_1 | chunk {43} 43.js, 43.js.map () 19.8 kB [rendered]
frontend_1 | chunk {44} 44.js, 44.js.map () 12.6 kB [rendered]
frontend_1 | chunk {45} 45.js, 45.js.map () 12.6 kB [rendered]
frontend_1 | chunk {46} 46.js, 46.js.map () 12 kB [rendered]
frontend_1 | chunk {47} 47.js, 47.js.map () 12.2 kB [rendered]
frontend_1 | chunk {48} 48.js, 48.js.map () 20.5 kB [rendered]
frontend_1 | chunk {49} 49.js, 49.js.map () 21.9 kB [rendered]
frontend_1 | chunk {50} 50.js, 50.js.map () 18.3 kB [rendered]
frontend_1 | chunk {51} 51.js, 51.js.map () 18.3 kB [rendered]
frontend_1 | chunk {52} 52.js, 52.js.map () 12.6 kB [rendered]
frontend_1 | chunk {53} 53.js, 53.js.map () 12.6 kB [rendered]
frontend_1 | chunk {54} 54.js, 54.js.map () 6.48 kB [rendered]
frontend_1 | chunk {55} 55.js, 55.js.map () 24.4 kB [rendered]
frontend_1 | chunk {56} 56.js, 56.js.map () 26.2 kB [rendered]
frontend_1 | chunk {57} 57.js, 57.js.map () 23.9 kB [rendered]
frontend_1 | chunk {58} 58.js, 58.js.map () 15.4 kB [rendered]
frontend_1 | chunk {59} 59.js, 59.js.map () 15.1 kB [rendered]
frontend_1 | chunk {60} 60.js, 60.js.map () 21.9 kB [rendered]
frontend_1 | chunk {61} 61.js, 61.js.map () 21.9 kB [rendered]
frontend_1 | chunk {62} 62.js, 62.js.map () 36.8 kB [rendered]
frontend_1 | chunk {63} 63.js, 63.js.map () 36.8 kB [rendered]
frontend_1 | chunk {64} 64.js, 64.js.map () 10.7 kB [rendered]
frontend_1 | chunk {65} 65.js, 65.js.map () 6.5 kB [rendered]
frontend_1 | chunk {66} 66.js, 66.js.map () 6.49 kB [rendered]
frontend_1 | chunk {67} 67.js, 67.js.map () 14.2 kB [rendered]
frontend_1 | chunk {68} 68.js, 68.js.map () 14.4 kB [rendered]
frontend_1 | chunk {69} 69.js, 69.js.map () 8.34 kB [rendered]
frontend_1 | chunk {70} 70.js, 70.js.map () 1.84 kB [rendered]
frontend_1 | chunk {71} 71.js, 71.js.map () 12.4 kB [rendered]
frontend_1 | chunk {72} 72.js, 72.js.map () 12.4 kB [rendered]
frontend_1 | chunk {73} 73.js, 73.js.map () 18.1 kB [rendered]
frontend_1 | chunk {74} 74.js, 74.js.map () 18.7 kB [rendered]
frontend_1 | chunk {75} 75.js, 75.js.map () 11 kB [rendered]
frontend_1 | chunk {76} 76.js, 76.js.map () 10.9 kB [rendered]
frontend_1 | chunk {77} 77.js, 77.js.map () 20.2 kB [rendered]
frontend_1 | chunk {common} common.js, common.js.map (common) 30.6 kB [rendered]
frontend_1 | chunk {core-js-js} core-js-js.js, core-js-js.js.map (core-js-js) 78.7 kB [rendered]
frontend_1 | chunk {css-shim-206ea950-3169f23e-js} css-shim-206ea950-3169f23e-js.js, css-shim-206ea950-3169f23e-js.js.map (css-shim-206ea950-3169f23e-js) 21.9 kB [rendered]
frontend_1 | chunk {dom-96781eef-a2fb04dd-js} dom-96781eef-a2fb04dd-js.js, dom-96781eef-a2fb04dd-js.js.map (dom-96781eef-a2fb04dd-js) 19.8 kB [rendered]
frontend_1 | chunk {dom-js} dom-js.js, dom-js.js.map (dom-js) 20.2 kB [rendered]
frontend_1 | chunk {focus-visible-70713a0c-js} focus-visible-70713a0c-js.js, focus-visible-70713a0c-js.js.map (focus-visible-70713a0c-js) 2.15 kB [rendered]
frontend_1 | chunk {hardware-back-button-5afe3cb0-js} hardware-back-button-5afe3cb0-js.js, hardware-back-button-5afe3cb0-js.js.map (hardware-back-button-5afe3cb0-js) 2.06 kB [rendered]
frontend_1 | chunk {home-home-module} home-home-module.js, home-home-module.js.map (home-home-module) 34.4 kB [rendered]
frontend_1 | chunk {index-69c37885-js} index-69c37885-js.js, index-69c37885-js.js.map (index-69c37885-js) 37.7 kB [rendered]
frontend_1 | chunk {input-shims-7a8a317c-js} input-shims-7a8a317c-js.js, input-shims-7a8a317c-js.js.map (input-shims-7a8a317c-js) 13.5 kB [rendered]
frontend_1 | chunk {ios-transition-becf5388-js} ios-transition-becf5388-js.js, ios-transition-becf5388-js.js.map (ios-transition-becf5388-js) 24.7 kB [rendered]
frontend_1 | chunk {leaderboard-leaderboard-module} leaderboard-leaderboard-module.js, leaderboard-leaderboard-module.js.map (leaderboard-leaderboard-module) 20.8 kB [rendered]
frontend_1 | chunk {login-login-module} login-login-module.js, login-login-module.js.map (login-login-module) 5.73 kB [rendered]
frontend_1 | chunk {main} main.js, main.js.map (main) 40.9 kB [initial] [rendered]
frontend_1 | chunk {md-transition-f444ed6d-js} md-transition-f444ed6d-js.js, md-transition-f444ed6d-js.js.map (md-transition-f444ed6d-js) 3.46 kB [rendered]
frontend_1 | chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 278 kB [initial] [rendered]
frontend_1 | chunk {profile-profile-module} profile-profile-module.js, profile-profile-module.js.map (profile-profile-module) 19.8 kB [rendered]
frontend_1 | chunk {quiz-quiz-module} quiz-quiz-module.js, quiz-quiz-module.js.map (quiz-quiz-module) 22.5 kB [rendered]
frontend_1 | chunk {quiz-result-quiz-result-module} quiz-result-quiz-result-module.js, quiz-result-quiz-result-module.js.map (quiz-result-quiz-result-module) 21.2 kB [rendered]
frontend_1 | chunk {runtime} runtime.js, runtime.js.map (runtime) 10 kB [entry] [rendered]
frontend_1 | chunk {shadow-css-4889ae62-23996f3f-js} shadow-css-4889ae62-23996f3f-js.js, shadow-css-4889ae62-23996f3f-js.js.map (shadow-css-4889ae62-23996f3f-js) 14.8 kB [rendered]
frontend_1 | chunk {status-tap-7ab22cb8-js} status-tap-7ab22cb8-js.js, status-tap-7ab22cb8-js.js.map (status-tap-7ab22cb8-js) 1.79 kB [rendered]
frontend_1 | chunk {styles} styles.js, styles.js.map (styles) 112 kB [initial] [rendered]
frontend_1 | chunk {swipe-back-35ad8e37-js} swipe-back-35ad8e37-js.js, swipe-back-35ad8e37-js.js.map (swipe-back-35ad8e37-js) 2.68 kB [rendered]
frontend_1 | chunk {swiper-bundle-ccdaac54-js} swiper-bundle-ccdaac54-js.js, swiper-bundle-ccdaac54-js.js.map (swiper-bundle-ccdaac54-js) 176 kB [rendered]
frontend_1 | chunk {tabs-tabs-module} tabs-tabs-module.js, tabs-tabs-module.js.map (tabs-tabs-module) 8.14 kB [rendered]
frontend_1 | chunk {tap-click-1f9d539e-js} tap-click-1f9d539e-js.js, tap-click-1f9d539e-js.js.map (tap-click-1f9d539e-js) 6.37 kB [rendered]
frontend_1 | chunk {vendor} vendor.js, vendor.js.map (vendor) 5.03 MB [initial] [rendered]
frontend_1 | Date: 2020-01-28T12:11:46.647Z - Hash: f5c10ec9500752dc7639 - Time: 15503ms
frontend_1 | ** Angular Live Development Server is listening on 0.0.0.0:4200, open your browser on http://localhost:4200/ **
frontend_1 | ℹ 「wdm」: Compiled successfully.
backend_1 | Database 'swm_lms_development' already exists
backend_1 | Database 'swm_lms_test' already exists
backend_1 | => Booting Puma
backend_1 | => Rails 6.0.0 application starting in development
backend_1 | => Run `rails server --help` for more startup options
backend_1 | Puma starting in single mode...
backend_1 | * Version 3.12.1 (ruby 2.5.5-p157), codename: Llamas in Pajamas
backend_1 | * Min threads: 5, max threads: 5
backend_1 | * Environment: development
backend_1 | * Listening on tcp://0.0.0.0:3000
backend_1 | Use Ctrl-C to stop
Here the browser output of the rails project
Unfortunately I could'nt find any solution for my problem so I hope that someone here can help me. Thanks in advance!
SUMMARY:
When I run the following command...
docker-compose up --build --exit-code-from combined --timeout 600; echo $?
My init.sh script, which is the entrypoint for my combined container, is run twice instead of once. I expect the init.sh script to be run only once. Why is this happening and how can I make it run only once?
THE FULL STORY:
I have two Docker containers:
b-db - contains my database
b-combined - contains my web application and a series of tests, which run once the container is up and running.
I'm using a docker-compose.yml file to start both containers.
version: '3'
services:
db:
build:
context: .
dockerfile: ./docker/db/Dockerfile
container_name: b-db
restart: unless-stopped
volumes:
- dbdata:/data/db
ports:
- "27017:27017"
networks:
- app-network
combined:
build:
context: .
dockerfile: ./docker/combined/Dockerfile
container_name: b-combined
restart: unless-stopped
env_file: .env
ports:
- "5000:5000"
- "8080:8080"
networks:
- app-network
depends_on:
- db
networks:
app-network:
driver: bridge
volumes:
dbdata:
node_modules:
Below is the Dockerfile for the combined service in docker-compose.yml.
FROM cypress/included:3.4.1
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm install
COPY . .
EXPOSE 5000
RUN npm install -g history-server nodemon
RUN npm run build-test
EXPOSE 8080
COPY ./docker/combined/init.sh /scripts/init.sh
RUN ["chmod", "+x", "/scripts/init.sh"]
ENTRYPOINT [ "/scripts/init.sh" ]
Below is what is in my init.sh file.
#!/bin/bash
# Start front end server
history-server dist -p 8080 &
front_pid=$!
# Start back end server that interacts with DB
nodemon -L server &
back_pid=$!
# Run a specific test
NODE_ENV=test $(npm bin)/cypress run --spec "cypress/integration/analytics_spec.js"
# Error code of the test
test_exit_code=$?
echo "TEST ENDED WITH EXIT CODE OF: $test_exit_code"
# End front and backend server
kill -9 $front_pid
kill -9 $back_pid
# Exit with the error code of the test
echo "EXITING SCRIPT WITH EXIT CODE OF: $test_exit_code"
exit "$test_exit_code"
Below is the Dockerfile for my db service. All its doing is copying some local data into the Docker container and then initialising the database with this data.
FROM mongo:3.6.14-xenial
COPY ./dump/ /tmp/dump/
COPY mongo_restore.sh /docker-entrypoint-initdb.d/
RUN chmod 777 /docker-entrypoint-initdb.d/mongo_restore.sh
Below is what is in mongo_restore.sh.
#!/bin/bash
# Creates db using copied data
mongorestore /tmp/dump
When I run the following command...
docker-compose up --build --exit-code-from combined --timeout 600; echo $?
I get the following output:
Building db
Step 1/4 : FROM mongo:3.6.14-xenial
---> 63abac6699cd
Step 2/4 : COPY ./dump/ /tmp/dump/
---> Using cache
---> c63b5bb8a6e6
Step 3/4 : COPY mongo_restore.sh /docker-entrypoint-initdb.d/
---> Using cache
---> 62de88a27f64
Step 4/4 : RUN chmod 777 /docker-entrypoint-initdb.d/mongo_restore.sh
---> Using cache
---> 041757bccef5
Successfully built 041757bccef5
Successfully tagged b-property_db:latest
Building combined
Step 1/17 : FROM cypress/included:3.4.1
---> 27da0246551c
Step 2/17 : WORKDIR /usr/src/app
---> Using cache
---> eea587fa33f8
Step 3/17 : RUN npm install -g n
---> Using cache
---> 6ee678f738a0
Step 4/17 : RUN n 9.2.0
---> Using cache
---> 27406ead3cff
Step 5/17 : COPY package*.json ./
---> Using cache
---> 7793be158259
Step 6/17 : RUN npm install npm#6.9.0
---> Using cache
---> ec6e4bae63ac
Step 7/17 : RUN rm -rf /usr/local/lib/node_modules/npm
---> Using cache
---> 3cbf0c0c0ec2
Step 8/17 : RUN mv node_modules/npm /usr/local/lib/node_modules/npm
---> Using cache
---> f92096e43ae1
Step 9/17 : RUN npm install
---> Using cache
---> c4b556ca3240
Step 10/17 : COPY . .
---> Using cache
---> 2c63f18d836d
Step 11/17 : EXPOSE 5000
---> Using cache
---> 8b8e1e7bab2b
Step 12/17 : RUN npm install -g history-server nodemon
---> Using cache
---> da8e46eb02b1
Step 13/17 : RUN npm run build-test
---> Using cache
---> 424f7171c913
Step 14/17 : EXPOSE 8080
---> Using cache
---> ef25e1f0d272
Step 15/17 : COPY ./docker/combined/init.sh /scripts/init.sh
---> Using cache
---> bd14264aac05
Step 16/17 : RUN ["chmod", "+x", "/scripts/init.sh"]
---> Using cache
---> 214afacc9ace
Step 17/17 : ENTRYPOINT [ "/scripts/init.sh" ]
---> Using cache
---> 9ed5241c92f1
Successfully built 9ed5241c92f1
Successfully tagged b-property_combined:latest
Recreating b-db ... done
Recreating b-combined ... done
Attaching to b-db, b-combined
b-db | 2019-12-13T11:27:30.229+0000 I CONTROL [initandlisten] MongoDB starting : pid=1 port=27017 dbpath=/data/db 64-bit host=3bbb8f5fe956
b-db | 2019-12-13T11:27:30.229+0000 I CONTROL [initandlisten] db version v3.6.14
b-db | 2019-12-13T11:27:30.229+0000 I CONTROL [initandlisten] git version: cbef87692475857c7ee6e764c8f5104b39c342a1
b-db | 2019-12-13T11:27:30.229+0000 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.2g 1 Mar 2016
b-db | 2019-12-13T11:27:30.229+0000 I CONTROL [initandlisten] allocator: tcmalloc
b-db | 2019-12-13T11:27:30.229+0000 I CONTROL [initandlisten] modules: none
b-db | 2019-12-13T11:27:30.229+0000 I CONTROL [initandlisten] build environment:
b-db | 2019-12-13T11:27:30.229+0000 I CONTROL [initandlisten] distmod: ubuntu1604
b-db | 2019-12-13T11:27:30.229+0000 I CONTROL [initandlisten] distarch: x86_64
b-db | 2019-12-13T11:27:30.229+0000 I CONTROL [initandlisten] target_arch: x86_64
b-db | 2019-12-13T11:27:30.229+0000 I CONTROL [initandlisten] options: { net: { bindIpAll: true } }
b-db | 2019-12-13T11:27:30.230+0000 I - [initandlisten] Detected data files in /data/db created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.
b-db | 2019-12-13T11:27:30.230+0000 I STORAGE [initandlisten]
b-db | 2019-12-13T11:27:30.230+0000 I STORAGE [initandlisten] ** WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine
b-db | 2019-12-13T11:27:30.230+0000 I STORAGE [initandlisten] ** See http://dochub.mongodb.org/core/prodnotes-filesystem
b-db | 2019-12-13T11:27:30.230+0000 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=2466M,session_max=20000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),compatibility=(release="3.0",require_max="3.0"),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),statistics_log=(wait=0),verbose=(recovery_progress),
b-db | 2019-12-13T11:27:30.882+0000 I STORAGE [initandlisten] WiredTiger message [1576236450:882897][1:0x7f78cf0bca40], txn-recover: Main recovery loop: starting at 70/242560
b-db | 2019-12-13T11:27:30.960+0000 I STORAGE [initandlisten] WiredTiger message [1576236450:960786][1:0x7f78cf0bca40], txn-recover: Recovering log 70 through 71
b-db | 2019-12-13T11:27:31.025+0000 I STORAGE [initandlisten] WiredTiger message [1576236451:25011][1:0x7f78cf0bca40], txn-recover: Recovering log 71 through 71
b-db | 2019-12-13T11:27:31.073+0000 I STORAGE [initandlisten] WiredTiger message [1576236451:73785][1:0x7f78cf0bca40], txn-recover: Set global recovery timestamp: 0
b-db | 2019-12-13T11:27:31.111+0000 I CONTROL [initandlisten]
b-db | 2019-12-13T11:27:31.111+0000 I CONTROL [initandlisten] ** WARNING: Access control is not enabled for the database.
b-db | 2019-12-13T11:27:31.111+0000 I CONTROL [initandlisten] ** Read and write access to data and configuration is unrestricted.
b-db | 2019-12-13T11:27:31.111+0000 I CONTROL [initandlisten]
b-db | 2019-12-13T11:27:31.113+0000 I FTDC [initandlisten] Initializing full-time diagnostic data capture with directory '/data/db/diagnostic.data'
b-db | 2019-12-13T11:27:31.114+0000 I NETWORK [initandlisten] waiting for connections on port 27017
b-combined | [nodemon] 2.0.2
b-combined | [nodemon] to restart at any time, enter `rs`
b-combined | [nodemon] watching dir(s): *.*
b-combined | [nodemon] watching extensions: js,mjs,json
b-combined | [nodemon] starting `node server.js`
b-combined | history-server listening on port 8080; Ctrl+C to stop
b-combined | raven#2.6.4 alert: no DSN provided, error reporting disabled
b-combined | test
b-combined | server started 5000
b-db | 2019-12-13T11:27:32.336+0000 I NETWORK [listener] connection accepted from 172.22.0.3:33086 #1 (1 connection now open)
b-db | 2019-12-13T11:27:32.340+0000 I NETWORK [conn1] received client metadata from 172.22.0.3:33086 conn1: { driver: { name: "nodejs", version: "3.2.7" }, os: { type: "Linux", name: "linux", architecture: "x64", version: "4.9.125-linuxkit" }, platform: "Node.js v9.2.0, LE, mongodb-core: 3.2.7" }
b-combined | Mongoose connected to mongodb://db:27017/book-test
b-db | 2019-12-13T11:27:32.359+0000 I NETWORK [listener] connection accepted from 172.22.0.3:33088 #2 (2 connections now open)
b-db | 2019-12-13T11:27:32.361+0000 I NETWORK [conn2] received client metadata from 172.22.0.3:33088 conn2: { driver: { name: "nodejs", version: "3.2.7" }, os: { type: "Linux", name: "linux", architecture: "x64", version: "4.9.125-linuxkit" }, platform: "Node.js v9.2.0, LE, mongodb-core: 3.2.7" }
b-db | 2019-12-13T11:27:32.364+0000 I NETWORK [listener] connection accepted from 172.22.0.3:33090 #3 (3 connections now open)
b-db | 2019-12-13T11:27:32.366+0000 I NETWORK [conn3] received client metadata from 172.22.0.3:33090 conn3: { driver: { name: "nodejs", version: "3.2.7" }, os: { type: "Linux", name: "linux", architecture: "x64", version: "4.9.125-linuxkit" }, platform: "Node.js v9.2.0, LE, mongodb-core: 3.2.7" }
b-db | 2019-12-13T11:27:36.866+0000 I NETWORK [listener] connection accepted from 172.22.0.3:33092 #4 (4 connections now open)
b-db | 2019-12-13T11:27:36.874+0000 I NETWORK [conn4] received client metadata from 172.22.0.3:33092 conn4: { driver: { name: "nodejs", version: "3.2.7" }, os: { type: "Linux", name: "linux", architecture: "x64", version: "4.9.125-linuxkit" }, platform: "Node.js v8.9.3, LE, mongodb-core: 3.2.7" }
b-db | 2019-12-13T11:27:36.874+0000 I NETWORK [listener] connection accepted from 172.22.0.3:33094 #5 (5 connections now open)
b-combined | Mongoose connected to mongodb://db:27017/book-test
b-db | 2019-12-13T11:27:36.892+0000 I NETWORK [conn5] received client metadata from 172.22.0.3:33094 conn5: { driver: { name: "nodejs", version: "3.2.7" }, os: { type: "Linux", name: "linux", architecture: "x64", version: "4.9.125-linuxkit" }, platform: "Node.js v8.9.3, LE, mongodb-core: 3.2.7" }
b-db | 2019-12-13T11:27:36.896+0000 I NETWORK [listener] connection accepted from 172.22.0.3:33096 #6 (6 connections now open)
b-db | 2019-12-13T11:27:36.897+0000 I NETWORK [conn6] received client metadata from 172.22.0.3:33096 conn6: { driver: { name: "nodejs", version: "3.2.7" }, os: { type: "Linux", name: "linux", architecture: "x64", version: "4.9.125-linuxkit" }, platform: "Node.js v8.9.3, LE, mongodb-core: 3.2.7" }
b-db | 2019-12-13T11:27:36.902+0000 I NETWORK [listener] connection accepted from 172.22.0.3:33098 #7 (7 connections now open)
b-db | 2019-12-13T11:27:36.903+0000 I NETWORK [conn7] received client metadata from 172.22.0.3:33098 conn7: { driver: { name: "nodejs", version: "3.2.7" }, os: { type: "Linux", name: "linux", architecture: "x64", version: "4.9.125-linuxkit" }, platform: "Node.js v8.9.3, LE, mongodb-core: 3.2.7" }
b-combined |
b-combined | ====================================================================================================
b-combined |
b-combined | (Run Starting)
b-combined |
b-combined | ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
b-combined | │ Cypress: 3.4.1 │
b-combined | │ Browser: Chrome 75 │
b-combined | │ Specs: 1 found (analytics_spec.js) │
b-combined | │ Searched: cypress/integration/analytics_spec.js │
b-combined | └────────────────────────────────────────────────────────────────────────────────────────────────┘
b-combined |
b-combined |
b-combined | ────────────────────────────────────────────────────────────────────────────────────────────────────
b-combined |
b-combined | Running: analytics_spec.js... (1 of 1)
b-combined |
b-combined |
b-combined | Analytics
b-combined | (node:212) DeprecationWarning: collection.remove is deprecated. Use deleteOne, deleteMany, or bulkWrite instead.
b-combined | (node:212) DeprecationWarning: collection.update is deprecated. Use updateOne, updateMany, or bulkWrite instead.
✓ displays listings on the side bar lazily for upcoming events (6113ms)
b-combined | user disconnected
b-combined | user disconnected
✓ displays listings on the side bar lazily for archived events (3635ms)
b-combined | user disconnected
b-combined | user disconnected
✓ allows the user to click between upcoming and archived (3538ms)
b-combined | user disconnected
b-combined | user disconnected
b-combined | user disconnected
b-combined | (node:30) DeprecationWarning: Mongoose: `findOneAndUpdate()` and `findOneAndDelete()` without the `useFindAndModify` option set to false are deprecated. See: https://mongoosejs.com/docs/deprecations.html#-findandmodify-
✓ updates prediction and view count (8660ms)
b-combined | user disconnected
b-combined | user disconnected
b-combined | user disconnected
b-combined | user disconnected
✓ takes users to the correct routes (7302ms)
b-combined |
b-combined |
b-combined | 5 passing (30s)
b-combined |
b-combined |
b-combined | (Results)
b-combined |
b-combined | ┌─────────────────────────────────┐
b-combined | │ Tests: 5 │
b-combined | │ Passing: 5 │
b-combined | │ Failing: 0 │
b-combined | │ Pending: 0 │
b-combined | │ Skipped: 0 │
b-combined | │ Screenshots: 0 │
b-combined | │ Video: false │
b-combined | │ Duration: 29 seconds │
b-combined | │ Spec Ran: analytics_spec.js │
b-combined | └─────────────────────────────────┘
b-combined |
b-combined |
b-combined | ====================================================================================================
b-combined |
b-combined | (Run Finished)
b-combined |
b-combined |
b-combined | Spec Tests Passing Failing Pending Skipped
b-combined | ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
b-combined | │ ✔ analytics_spec.js 00:29 5 5 - - - │
b-combined | └────────────────────────────────────────────────────────────────────────────────────────────────┘
b-combined | All specs passed! 00:29 5 5 - - -
b-combined |
b-combined | Mongoose disconnected
b-db | 2019-12-13T11:28:09.278+0000 I NETWORK [conn4] end connection 172.22.0.3:33092 (6 connections now open)
b-db | 2019-12-13T11:28:09.279+0000 I NETWORK [conn6] end connection 172.22.0.3:33096 (5 connections now open)
b-combined | Mongoose disconnected through app shutdown
b-db | 2019-12-13T11:28:09.279+0000 I NETWORK [conn7] end connection 172.22.0.3:33098 (4 connections now open)
b-db | 2019-12-13T11:28:09.305+0000 I NETWORK [conn5] end connection 172.22.0.3:33094 (3 connections now open)
b-combined | user disconnected
b-combined | TEST ENDED WITH EXIT CODE OF: 0 ===========================
b-combined | EXITING SCRIPT WITH EXIT CODE OF: 0 =====================================
b-db | 2019-12-13T11:28:09.512+0000 I NETWORK [conn2] end connection 172.22.0.3:33088 (2 connections now open)
b-db | 2019-12-13T11:28:09.512+0000 I NETWORK [conn3] end connection 172.22.0.3:33090 (1 connection now open)
b-db | 2019-12-13T11:28:09.512+0000 I NETWORK [conn1] end connection 172.22.0.3:33086 (0 connections now open)
b-combined | [nodemon] 2.0.2
b-combined | [nodemon] to restart at any time, enter `rs`
b-combined | [nodemon] watching dir(s): *.*
b-combined | [nodemon] watching extensions: js,mjs,json
b-combined | [nodemon] starting `node server.js`
b-combined | history-server listening on port 8080; Ctrl+C to stop
b-combined | raven#2.6.4 alert: no DSN provided, error reporting disabled
b-combined | test
b-combined | server started 5000
b-db | 2019-12-13T11:28:13.290+0000 I NETWORK [listener] connection accepted from 172.22.0.3:33342 #8 (1 connection now open)
b-db | 2019-12-13T11:28:13.293+0000 I NETWORK [conn8] received client metadata from 172.22.0.3:33342 conn8: { driver: { name: "nodejs", version: "3.2.7" }, os: { type: "Linux", name: "linux", architecture: "x64", version: "4.9.125-linuxkit" }, platform: "Node.js v9.2.0, LE, mongodb-core: 3.2.7" }
b-combined | Mongoose connected to mongodb://db:27017/book-test
b-db | 2019-12-13T11:28:13.312+0000 I NETWORK [listener] connection accepted from 172.22.0.3:33344 #9 (2 connections now open)
b-db | 2019-12-13T11:28:13.313+0000 I NETWORK [conn9] received client metadata from 172.22.0.3:33344 conn9: { driver: { name: "nodejs", version: "3.2.7" }, os: { type: "Linux", name: "linux", architecture: "x64", version: "4.9.125-linuxkit" }, platform: "Node.js v9.2.0, LE, mongodb-core: 3.2.7" }
b-db | 2019-12-13T11:28:13.317+0000 I NETWORK [listener] connection accepted from 172.22.0.3:33346 #10 (3 connections now open)
b-db | 2019-12-13T11:28:13.317+0000 I NETWORK [conn10] received client metadata from 172.22.0.3:33346 conn10: { driver: { name: "nodejs", version: "3.2.7" }, os: { type: "Linux", name: "linux", architecture: "x64", version: "4.9.125-linuxkit" }, platform: "Node.js v9.2.0, LE, mongodb-core: 3.2.7" }
b-db | 2019-12-13T11:28:17.821+0000 I NETWORK [listener] connection accepted from 172.22.0.3:33348 #11 (4 connections now open)
b-db | 2019-12-13T11:28:17.826+0000 I NETWORK [conn11] received client metadata from 172.22.0.3:33348 conn11: { driver: { name: "nodejs", version: "3.2.7" }, os: { type: "Linux", name: "linux", architecture: "x64", version: "4.9.125-linuxkit" }, platform: "Node.js v8.9.3, LE, mongodb-core: 3.2.7" }
b-combined | Mongoose connected to mongodb://db:27017/book-test
b-db | 2019-12-13T11:28:17.843+0000 I NETWORK [listener] connection accepted from 172.22.0.3:33350 #12 (5 connections now open)
b-db | 2019-12-13T11:28:17.849+0000 I NETWORK [conn12] received client metadata from 172.22.0.3:33350 conn12: { driver: { name: "nodejs", version: "3.2.7" }, os: { type: "Linux", name: "linux", architecture: "x64", version: "4.9.125-linuxkit" }, platform: "Node.js v8.9.3, LE, mongodb-core: 3.2.7" }
b-db | 2019-12-13T11:28:17.851+0000 I NETWORK [listener] connection accepted from 172.22.0.3:33352 #13 (6 connections now open)
b-db | 2019-12-13T11:28:17.851+0000 I NETWORK [conn13] received client metadata from 172.22.0.3:33352 conn13: { driver: { name: "nodejs", version: "3.2.7" }, os: { type: "Linux", name: "linux", architecture: "x64", version: "4.9.125-linuxkit" }, platform: "Node.js v8.9.3, LE, mongodb-core: 3.2.7" }
b-db | 2019-12-13T11:28:17.857+0000 I NETWORK [listener] connection accepted from 172.22.0.3:33354 #14 (7 connections now open)
b-db | 2019-12-13T11:28:17.857+0000 I NETWORK [conn14] received client metadata from 172.22.0.3:33354 conn14: { driver: { name: "nodejs", version: "3.2.7" }, os: { type: "Linux", name: "linux", architecture: "x64", version: "4.9.125-linuxkit" }, platform: "Node.js v8.9.3, LE, mongodb-core: 3.2.7" }
b-combined |
b-combined | ====================================================================================================
b-combined |
b-combined | (Run Starting)
b-combined |
b-combined | ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
b-combined | │ Cypress: 3.4.1 │
b-combined | │ Browser: Chrome 75 │
b-combined | │ Specs: 1 found (analytics_spec.js) │
b-combined | │ Searched: cypress/integration/analytics_spec.js │
b-combined | └────────────────────────────────────────────────────────────────────────────────────────────────┘
b-combined |
b-combined |
b-combined | ────────────────────────────────────────────────────────────────────────────────────────────────────
b-combined |
b-combined | Running: analytics_spec.js... (1 of 1)
b-combined |
b-combined |
b-combined | Analytics
b-combined | (node:212) DeprecationWarning: collection.remove is deprecated. Use deleteOne, deleteMany, or bulkWrite instead.
b-combined | (node:212) DeprecationWarning: collection.update is deprecated. Use updateOne, updateMany, or bulkWrite instead.
✓ displays listings on the side bar lazily for upcoming events (6565ms)
b-combined | user disconnected
b-combined | user disconnected
✓ displays listings on the side bar lazily for archived events (4227ms)
b-combined | user disconnected
b-combined | user disconnected
✓ allows the user to click between upcoming and archived (3456ms)
b-combined | user disconnected
b-combined | user disconnected
b-combined | user disconnected
b-combined | (node:30) DeprecationWarning: Mongoose: `findOneAndUpdate()` and `findOneAndDelete()` without the `useFindAndModify` option set to false are deprecated. See: https://mongoosejs.com/docs/deprecations.html#-findandmodify-
✓ updates prediction and view count (9194ms)
b-combined | user disconnected
b-combined | user disconnected
b-combined | user disconnected
b-combined | user disconnected
✓ takes users to the correct routes (8759ms)
b-combined |
b-combined |
b-combined | 5 passing (32s)
b-combined |
b-combined |
b-combined | (Results)
b-combined |
b-combined | ┌─────────────────────────────────┐
b-combined | │ Tests: 5 │
b-combined | │ Passing: 5 │
b-combined | │ Failing: 0 │
b-combined | │ Pending: 0 │
b-combined | │ Skipped: 0 │
b-combined | │ Screenshots: 0 │
b-combined | │ Video: false │
b-combined | │ Duration: 32 seconds │
b-combined | │ Spec Ran: analytics_spec.js │
b-combined | └─────────────────────────────────┘
b-combined |
b-combined |
b-combined | ====================================================================================================
b-combined |
b-combined | (Run Finished)
b-combined |
b-combined |
b-combined | Spec Tests Passing Failing Pending Skipped
b-combined | ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
b-combined | │ ✔ analytics_spec.js 00:32 5 5 - - - │
b-combined | └────────────────────────────────────────────────────────────────────────────────────────────────┘
b-combined | All specs passed! 00:32 5 5 - - -
b-combined |
b-combined | user disconnected
b-combined | Mongoose disconnected
b-db | 2019-12-13T11:28:53.042+0000 I NETWORK [conn13] end connection 172.22.0.3:33352 (6 connections now open)
b-db | 2019-12-13T11:28:53.042+0000 I NETWORK [conn11] end connection 172.22.0.3:33348 (5 connections now open)
b-db | 2019-12-13T11:28:53.042+0000 I NETWORK [conn14] end connection 172.22.0.3:33354 (4 connections now open)
b-combined | Mongoose disconnected through app shutdown
b-db | 2019-12-13T11:28:53.065+0000 I NETWORK [conn12] end connection 172.22.0.3:33350 (3 connections now open)
b-combined | TEST ENDED WITH EXIT CODE OF: 0 ===========================
b-combined | EXITING SCRIPT WITH EXIT CODE OF: 0 =====================================
b-db | 2019-12-13T11:28:53.204+0000 I NETWORK [conn9] end connection 172.22.0.3:33344 (2 connections now open)
b-db | 2019-12-13T11:28:53.205+0000 I NETWORK [conn8] end connection 172.22.0.3:33342 (1 connection now open)
b-db | 2019-12-13T11:28:53.205+0000 I NETWORK [conn10] end connection 172.22.0.3:33346 (0 connections now open)
b-combined exited with code 0
Aborting on container exit...
Stopping b-combined ... done
Stopping b-db ... done
0
I expect my init.sh script to be run once but as you can see from the above output, docker-compose runs my init.sh script twice.
I've pulled out the following snippets from the above output to demonstrate that the init.sh script is indeed being run twice:
172.22.0.3:33094 (3 connections now open)
b-combined | user disconnected
b-combined | TEST ENDED WITH EXIT CODE OF: 0 ===========================
b-combined | EXITING SCRIPT WITH EXIT CODE OF: 0 =====================================
...
172.22.0.3:33350 (3 connections now open)
b-combined | TEST ENDED WITH EXIT CODE OF: 0 ===========================
b-combined | EXITING SCRIPT WITH EXIT CODE OF: 0
Why is this happening and how can I ensure docker-compose runs my init.sh script once?
Fixed by removing restart: unless-stopped from docker-compose.yml file.
I'm trying to get webpacker working with docker, puma 3.10.0, rails 5.1.4, and webpacker 3.0.1.
I have the following config set up for docker:
Dockerfile
FROM ruby:2.4.1
ENV DIR=/app \
BUNDLE_JOBS=4
RUN curl -sL https://deb.nodesource.com/setup_7.x | bash -
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs openssl yarn
RUN mkdir $DIR
WORKDIR $DIR
ADD Gemfile $DIR/Gemfile
ADD Gemfile.lock $DIR/Gemfile.lock
RUN bundle install
RUN gem install foreman
ADD . $DIR
EXPOSE 3000
ADD docker-entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD bundle exec rails s -p 3000 -b 0.0.0.0
docker-compose.yml
version: "2"
services:
db:
image: postgres
env_file:
- docker.env
webpacker:
build: .
command: bundle exec bin/webpack-dev-server
ports:
- "8080:8080"
app:
build: .
links:
- db:db
ports:
- "3000:3000"
depends_on:
- db
- webpacker
env_file:
- docker.env
command: bundle exec rails s -p 3000 -b '0.0.0.0'
Unfortunately, whenever I run docker-compose up and visit localhost:3000, I get the following error:
#<Errno::EADDRNOTAVAIL: Cannot assign requested address - connect(2) for [::1]:3035>
Any help is greatly appreciated. Thank you people.
EDIT below is the log from my webpack and app containers:
webpacker_1 |
webpacker_1 | Project is running at http://localhost:3035/
webpacker_1 | webpack output is served from /packs/
webpacker_1 | Content not from webpack is served from /app/public/packs
webpacker_1 | 404s will fallback to /index.html
webpacker_1 | Running /app/node_modules/.bin/elm-make /app/app/javascript/packs/Main.elm --yes --warn --debug --output /tmp/117813-1-17kg4e0.13yc01wcdi.js
webpacker_1 | 14% building modules 40/57 Success! Compiled 1 module./lib/transport/xhr-streaming.js
webpacker_1 | Successfully generated /tmp/117813-1-17kg4e0.13yc01wcdi.js
webpacker_1 |
94% asset optimHash: 0fba3c9f83d08f099017
webpacker_1 | Version: webpack 3.5.6
webpacker_1 | Time: 4214ms
webpacker_1 | Asset Size Chunks Chunk Names
webpacker_1 | hello_elm-a49ad0a3ed48411416eb.js 1.87 MB 0 [emitted] [big] hello_elm
webpacker_1 | Main-f0a26307d1db1882a32b.js 1.87 MB 1 [emitted] [big] Main
webpacker_1 | application-963cd78993444428f61c.js 896 kB 2 [emitted] [big] application
webpacker_1 | manifest.json 182 bytes [emitted]
webpacker_1 | [34] (webpack)-dev-server/client?http://localhost:3035 5.83 kB {0} {1} {2} [built]
webpacker_1 | [35] ./node_modules/url/url.js 23.3 kB {0} {1} {2} [built]
webpacker_1 | [41] ./node_modules/strip-ansi/index.js 161 bytes {0} {1} {2} [built]
webpacker_1 | [43] ./node_modules/loglevel/lib/loglevel.js 7.74 kB {0} {1} {2} [built]
webpacker_1 | [44] (webpack)-dev-server/client/socket.js 856 bytes {0} {1} {2} [built]
webpacker_1 | [45] ./node_modules/sockjs-client/lib/entry.js 244 bytes {0} {1} {2} [built]
webpacker_1 | [77] (webpack)-dev-server/client/overlay.js 3.6 kB {0} {1} {2} [built]
webpacker_1 | [82] (webpack)/hot nonrecursive ^\.\/log$ 170 bytes {0} {1} {2} [built]
webpacker_1 | [84] (webpack)/hot/emitter.js 77 bytes {0} {1} {2} [built]
webpacker_1 | [86] ./app/javascript/packs/Main.elm 335 kB {0} {1} [built]
webpacker_1 | [87] multi (webpack)-dev-server/client?http://localhost:3035 ./app/javascript/packs/application.js 40 bytes {2} [built]
webpacker_1 | [88] ./app/javascript/packs/application.js 515 bytes {2} [built]
webpacker_1 | [89] multi (webpack)-dev-server/client?http://localhost:3035 ./app/javascript/packs/hello_elm.js 40 bytes {0} [built]
webpacker_1 | [90] ./app/javascript/packs/hello_elm.js 396 bytes {0} [built]
webpacker_1 | [91] multi (webpack)-dev-server/client?http://localhost:3035 ./app/javascript/packs/Main.elm 40 bytes {1} [built]
webpacker_1 | + 77 hidden modules
webpacker_1 | webpack: Compiled successfully.
webpacker_1 | Project is running at http://localhost:3035/
webpacker_1 | webpack output is served from /packs/
webpacker_1 | Content not from webpack is served from /app/public/packs
webpacker_1 | 404s will fallback to /index.html
webpacker_1 | Running /app/node_modules/.bin/elm-make /app/app/javascript/packs/Main.elm --yes --warn --debug --output /tmp/117813-1-1lm55js.r9mkgzm2t9.js
webpacker_1 | 14% building modules 40/57 modules 17 active ...ockjsSuccess! Compiled 1 module.et.js
webpacker_1 | Successfully generated /tmp/117813-1-1lm55js.r9mkgzm2t9.js
webpacker_1 |
92% chunk assetHash: 0fba3c9f83d08f099017
webpacker_1 | Version: webpack 3.5.6
webpacker_1 | Time: 3059ms
webpacker_1 | Asset Size Chunks Chunk Names
webpacker_1 | hello_elm-a49ad0a3ed48411416eb.js 1.87 MB 0 [emitted] [big] hello_elm
webpacker_1 | Main-f0a26307d1db1882a32b.js 1.87 MB 1 [emitted] [big] Main
webpacker_1 | application-963cd78993444428f61c.js 896 kB 2 [emitted] [big] application
webpacker_1 | manifest.json 182 bytes [emitted]
webpacker_1 | [34] (webpack)-dev-server/client?http://localhost:3035 5.83 kB {0} {1} {2} [built]
webpacker_1 | [35] ./node_modules/url/url.js 23.3 kB {0} {1} {2} [built]
webpacker_1 | [41] ./node_modules/strip-ansi/index.js 161 bytes {0} {1} {2} [built]
webpacker_1 | [43] ./node_modules/loglevel/lib/loglevel.js 7.74 kB {0} {1} {2} [built]
webpacker_1 | [44] (webpack)-dev-server/client/socket.js 856 bytes {0} {1} {2} [built]
webpacker_1 | [45] ./node_modules/sockjs-client/lib/entry.js 244 bytes {0} {1} {2} [built]
webpacker_1 | [77] (webpack)-dev-server/client/overlay.js 3.6 kB {0} {1} {2} [built]
webpacker_1 | [82] (webpack)/hot nonrecursive ^\.\/log$ 170 bytes {0} {1} {2} [built]
webpacker_1 | [84] (webpack)/hot/emitter.js 77 bytes {0} {1} {2} [built]
webpacker_1 | [86] ./app/javascript/packs/Main.elm 335 kB {0} {1} [built]
webpacker_1 | [87] multi (webpack)-dev-server/client?http://localhost:3035 ./app/javascript/packs/application.js 40 bytes {2} [built]
webpacker_1 | [88] ./app/javascript/packs/application.js 515 bytes {2} [built]
webpacker_1 | [89] multi (webpack)-dev-server/client?http://localhost:3035 ./app/javascript/packs/hello_elm.js 40 bytes {0} [built]
webpacker_1 | [90] ./app/javascript/packs/hello_elm.js 396 bytes {0} [built]
webpacker_1 | [91] multi (webpack)-dev-server/client?http://localhost:3035 ./app/javascript/packs/Main.elm 40 bytes {1} [built]
webpacker_1 | + 77 hidden modules
webpacker_1 | webpack: Compiled successfully.
webpacker_1 | Project is running at http://localhost:3035/
webpacker_1 | webpack output is served from /packs/
webpacker_1 | Content not from webpack is served from /app/public/packs
webpacker_1 | 404s will fallback to /index.html
webpacker_1 | Running /app/node_modules/.bin/elm-make /app/app/javascript/packs/Main.elm --yes --warn --debug --output /tmp/117813-1-1pnkvvy.kvz0s2x1or.js
webpacker_1 | 14% buiSuccess! Compiled 1 module. 17 active ...s-client/lib/transport/xdr-polling.js
webpacker_1 | Successfully generated /tmp/117813-1-1pnkvvy.kvz0s2x1or.js
webpacker_1 |
webpack 92% chunk assetHash: 0fba3c9f83d08f099017
webpacker_1 | Version: webpack 3.5.6
webpacker_1 | Time: 3705ms
webpacker_1 | Asset Size Chunks Chunk Names
webpacker_1 | hello_elm-a49ad0a3ed48411416eb.js 1.87 MB 0 [emitted] [big] hello_elm
webpacker_1 | Main-f0a26307d1db1882a32b.js 1.87 MB 1 [emitted] [big] Main
webpacker_1 | application-963cd78993444428f61c.js 896 kB 2 [emitted] [big] application
webpacker_1 | manifest.json 182 bytes [emitted]
webpacker_1 | [34] (webpack)-dev-server/client?http://localhost:3035 5.83 kB {0} {1} {2} [built]
webpacker_1 | [35] ./node_modules/url/url.js 23.3 kB {0} {1} {2} [built]
webpacker_1 | [41] ./node_modules/strip-ansi/index.js 161 bytes {0} {1} {2} [built]
webpacker_1 | [43] ./node_modules/loglevel/lib/loglevel.js 7.74 kB {0} {1} {2} [built]
webpacker_1 | [44] (webpack)-dev-server/client/socket.js 856 bytes {0} {1} {2} [built]
webpacker_1 | [45] ./node_modules/sockjs-client/lib/entry.js 244 bytes {0} {1} {2} [built]
webpacker_1 | [77] (webpack)-dev-server/client/overlay.js 3.6 kB {0} {1} {2} [built]
webpacker_1 | [82] (webpack)/hot nonrecursive ^\.\/log$ 170 bytes {0} {1} {2} [built]
webpacker_1 | [84] (webpack)/hot/emitter.js 77 bytes {0} {1} {2} [built]
webpacker_1 | [86] ./app/javascript/packs/Main.elm 335 kB {0} {1} [built]
webpacker_1 | [87] multi (webpack)-dev-server/client?http://localhost:3035 ./app/javascript/packs/application.js 40 bytes {2} [built]
webpacker_1 | [88] ./app/javascript/packs/application.js 515 bytes {2} [built]
webpacker_1 | [89] multi (webpack)-dev-server/client?http://localhost:3035 ./app/javascript/packs/hello_elm.js 40 bytes {0} [built]
webpacker_1 | [90] ./app/javascript/packs/hello_elm.js 396 bytes {0} [built]
webpacker_1 | [91] multi (webpack)-dev-server/client?http://localhost:3035 ./app/javascript/packs/Main.elm 40 bytes {1} [built]
webpacker_1 | + 77 hidden modules
webpacker_1 | webpack: Compiled successfully.
app_1 | DEPRECATION WARNING: ActionView::Template::Handlers::Erubis is deprecated and will be removed from Rails 5.2. Switch to ActionView::Template::Handlers::ERB::Erubi instead. (called from require at /usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.1/lib/bundler/runtime.rb:82)
app_1 | W, [2017-09-13T15:44:45.382875 #1] WARN -- : [SKYLIGHT] [1.3.1] Running Skylight in development mode. No data will be reported until you deploy your app.
app_1 | (To disable this message for all local apps, run `skylight disable_dev_warning`.)
app_1 | /app/app/models/test_attempts/context_test_attempt.rb:86: warning: circular argument reference - ability_estimate
app_1 | => Booting Puma
app_1 | => Rails 5.1.4 application starting in development
app_1 | => Run `rails server -h` for more startup options
app_1 | Puma starting in single mode...
app_1 | * Version 3.10.0 (ruby 2.4.1-p111), codename: Russell's Teapot
app_1 | * Min threads: 5, max threads: 5
app_1 | * Environment: development
app_1 | * Listening on tcp://0.0.0.0:3000
app_1 | Use Ctrl-C to stop
app_1 | Started GET "/" for 172.18.0.1 at 2017-09-13 15:44:56 +0000
app_1 | Cannot render console from 172.18.0.1! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255
app_1 | (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
app_1 | Processing by PagesController#index as HTML
app_1 | (0.3ms) BEGIN
app_1 | (0.3ms) ROLLBACK
app_1 | Rendering layouts/application.html.haml
app_1 | Rendering pages/index.html.haml within layouts/application
app_1 | Rendered pages/index.html.haml within layouts/application (78.9ms)
app_1 | Rendered shared/_head.html.haml (37895.2ms)
app_1 | Rendered shared/_flash.html.haml (1.0ms)
app_1 | Rendered shared/_header.html.haml (39.9ms)
app_1 | Rendered shared/_footer.html.haml (16.0ms)
app_1 | Rendered shared/_analytics.html.haml (0.9ms)
app_1 | Rendered layouts/application.html.haml (38089.9ms)
app_1 | Completed 200 OK in 38677ms (Views: 38152.2ms | ActiveRecord: 7.0ms)
app_1 |
app_1 |
app_1 | 2017-09-13 15:45:35 +0000: Rack app error handling request { GET / }
app_1 | #<Errno::EADDRNOTAVAIL: Cannot assign requested address - connect(2) for [::1]:3035>
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:1198:in `__connect_nonblock'
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:1198:in `connect_nonblock'
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:56:in `connect_internal'
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:137:in `connect'
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:627:in `block in tcp'
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:227:in `each'
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:227:in `foreach'
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:617:in `tcp'
app_1 | /usr/local/bundle/gems/webpacker-3.0.1/lib/webpacker/dev_server.rb:9:in `running?'
app_1 | /usr/local/bundle/gems/webpacker-3.0.1/lib/webpacker/dev_server_proxy.rb:7:in `rewrite_response'
app_1 | /usr/local/bundle/gems/rack-proxy-0.6.2/lib/rack/proxy.rb:57:in `call'
app_1 | /usr/local/bundle/gems/railties-5.1.4/lib/rails/engine.rb:522:in `call'
app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/configuration.rb:225:in `call'
app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/server.rb:605:in `handle_request'
app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/server.rb:437:in `process_client'
app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/server.rb:301:in `block in run'
app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/thread_pool.rb:120:in `block in spawn_thread'
app_1 | 2017-09-13 15:45:35 +0000: Rack app error handling request { GET /favicon.ico }
app_1 | #<Errno::EADDRNOTAVAIL: Cannot assign requested address - connect(2) for [::1]:3035>
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:1198:in `__connect_nonblock'
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:1198:in `connect_nonblock'
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:56:in `connect_internal'
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:137:in `connect'
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:627:in `block in tcp'
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:227:in `each'
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:227:in `foreach'
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:617:in `tcp'
app_1 | /usr/local/bundle/gems/webpacker-3.0.1/lib/webpacker/dev_server.rb:9:in `running?'
app_1 | /usr/local/bundle/gems/webpacker-3.0.1/lib/webpacker/dev_server_proxy.rb:7:in `rewrite_response'
app_1 | /usr/local/bundle/gems/rack-proxy-0.6.2/lib/rack/proxy.rb:57:in `call'
app_1 | /usr/local/bundle/gems/railties-5.1.4/lib/rails/engine.rb:522:in `call'
app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/configuration.rb:225:in `call'
app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/server.rb:605:in `handle_request'
app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/server.rb:437:in `process_client'
app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/server.rb:301:in `block in run'
app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/thread_pool.rb:120:in `block in spawn_thread'
app_1 | Started GET "/" for 172.18.0.1 at 2017-09-13 15:45:51 +0000
app_1 | Cannot render console from 172.18.0.1! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255
app_1 | Processing by PagesController#index as HTML
app_1 | (0.2ms) BEGIN
app_1 | (0.2ms) ROLLBACK
app_1 | Rendering layouts/application.html.haml
app_1 | Rendering pages/index.html.haml within layouts/application
app_1 | Rendered shared/_locked_flash.html.haml (1.2ms)
app_1 | Rendered pages/index.html.haml within layouts/application (15.5ms)
app_1 | Rendered shared/_head.html.haml (164.7ms)
app_1 | Rendered shared/_flash.html.haml (1.2ms)
app_1 | Rendered shared/_header.html.haml (20.2ms)
app_1 | Rendered shared/_footer.html.haml (8.1ms)
app_1 | Rendered shared/_analytics.html.haml (1.0ms)
app_1 | Rendered layouts/application.html.haml (253.2ms)
app_1 | Completed 200 OK in 294ms (Views: 269.1ms | ActiveRecord: 5.4ms)
app_1 |
app_1 |
app_1 | 2017-09-13 15:45:51 +0000: Rack app error handling request { GET / }
app_1 | #<Errno::EADDRNOTAVAIL: Cannot assign requested address - connect(2) for [::1]:3035>
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:1198:in `__connect_nonblock'
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:1198:in `connect_nonblock'
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:56:in `connect_internal'
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:137:in `connect'
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:627:in `block in tcp'
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:227:in `each'
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:227:in `foreach'
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:617:in `tcp'
app_1 | /usr/local/bundle/gems/webpacker-3.0.1/lib/webpacker/dev_server.rb:9:in `running?'
app_1 | /usr/local/bundle/gems/webpacker-3.0.1/lib/webpacker/dev_server_proxy.rb:7:in `rewrite_response'
app_1 | /usr/local/bundle/gems/rack-proxy-0.6.2/lib/rack/proxy.rb:57:in `call'
app_1 | /usr/local/bundle/gems/railties-5.1.4/lib/rails/engine.rb:522:in `call'
app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/configuration.rb:225:in `call'
app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/server.rb:605:in `handle_request'
app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/server.rb:437:in `process_client'
app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/server.rb:301:in `block in run'
app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/thread_pool.rb:120:in `block in spawn_thread'
app_1 | 2017-09-13 15:45:51 +0000: Rack app error handling request { GET /favicon.ico }
app_1 | #<Errno::EADDRNOTAVAIL: Cannot assign requested address - connect(2) for [::1]:3035>
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:1198:in `__connect_nonblock'
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:1198:in `connect_nonblock'
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:56:in `connect_internal'
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:137:in `connect'
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:627:in `block in tcp'
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:227:in `each'
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:227:in `foreach'
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:617:in `tcp'
app_1 | /usr/local/bundle/gems/webpacker-3.0.1/lib/webpacker/dev_server.rb:9:in `running?'
app_1 | /usr/local/bundle/gems/webpacker-3.0.1/lib/webpacker/dev_server_proxy.rb:7:in `rewrite_response'
app_1 | /usr/local/bundle/gems/rack-proxy-0.6.2/lib/rack/proxy.rb:57:in `call'
app_1 | /usr/local/bundle/gems/railties-5.1.4/lib/rails/engine.rb:522:in `call'
app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/configuration.rb:225:in `call'
app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/server.rb:605:in `handle_request'
app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/server.rb:437:in `process_client'
app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/server.rb:301:in `block in run'
app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/thread_pool.rb:120:in `block in spawn_thread'
Here's the error output displayed on the actual webpage itself:
Puma caught this error: Cannot assign requested address - connect(2) for [::1]:3035 (Errno::EADDRNOTAVAIL)
/usr/local/lib/ruby/2.4.0/socket.rb:1198:in `__connect_nonblock'
/usr/local/lib/ruby/2.4.0/socket.rb:1198:in `connect_nonblock'
/usr/local/lib/ruby/2.4.0/socket.rb:56:in `connect_internal'
/usr/local/lib/ruby/2.4.0/socket.rb:137:in `connect'
/usr/local/lib/ruby/2.4.0/socket.rb:627:in `block in tcp'
/usr/local/lib/ruby/2.4.0/socket.rb:227:in `each'
/usr/local/lib/ruby/2.4.0/socket.rb:227:in `foreach'
/usr/local/lib/ruby/2.4.0/socket.rb:617:in `tcp'
/usr/local/bundle/gems/webpacker-3.0.1/lib/webpacker/dev_server.rb:9:in `running?'
/usr/local/bundle/gems/webpacker-3.0.1/lib/webpacker/dev_server_proxy.rb:7:in `rewrite_response'
/usr/local/bundle/gems/rack-proxy-0.6.2/lib/rack/proxy.rb:57:in `call'
/usr/local/bundle/gems/railties-5.1.4/lib/rails/engine.rb:522:in `call'
/usr/local/bundle/gems/puma-3.10.0/lib/puma/configuration.rb:225:in `call'
/usr/local/bundle/gems/puma-3.10.0/lib/puma/server.rb:605:in `handle_request'
/usr/local/bundle/gems/puma-3.10.0/lib/puma/server.rb:437:in `process_client'
/usr/local/bundle/gems/puma-3.10.0/lib/puma/server.rb:301:in `block in run'
/usr/local/bundle/gems/puma-3.10.0/lib/puma/thread_pool.rb:120:in `block in spawn_thread'
You need set the --listen-host value that gets passed to webpack-dev-server.
You can achieve this by editing the file config/webpacker.yml and changing the development:dev_server:host: value from localhost to 0.0.0.0, that should solve the problem.