coopdevs / coopdevs-old-web

coopdevs.org content
http://coopdevs.org
2 stars 10 forks source link

Error trying to start development environment #104

Closed enricostano closed 4 years ago

enricostano commented 4 years ago
$ sudo docker-compose up
Starting coopdevsgithubio_web_1 ... done
Attaching to coopdevsgithubio_web_1
web_1  | Configuration file: /app/_config.yml
web_1  |             Source: /app
web_1  |        Destination: /app/_site
web_1  |  Incremental build: enabled
web_1  |       Generating... 
web_1  | Building site for default language: "ca" to: /app/_site
web_1  | Loading translation from file /app/_i18n/ca.yml
web_1  |   Conversion error: Jekyll::Converters::PostCss encountered an error while converting 'css/site.css':
web_1  |                     PostCssNotFoundError
web_1  | jekyll 3.7.4 | Error:  PostCssNotFoundError
coopdevsgithubio_web_1 exited with code 1
sauloperez commented 4 years ago

Have you tried without sudo as documented in https://github.com/coopdevs/coopdevs.github.io/blob/develop/README.md#docker ?

Without it, it simply works for me. Otherwise, docker-compose up --build the first should build the container image and among others, install npm packages, which will include postcss.

enricostano commented 4 years ago

Thanks @sauloperez , adding my user to docker group solved the sudo issue, but I still get the same error:

$ docker-compose up --build
Building web
Step 1/7 : FROM ruby:2.6-alpine
 ---> 3304101ccbe9
Step 2/7 : RUN apk update     && apk upgrade     && apk add --update --no-cache       g++       musl-dev       make       libstdc++       yarn
 ---> Using cache
 ---> 69ac14122171
Step 3/7 : WORKDIR /app
 ---> Using cache
 ---> 3f2be994848b
Step 4/7 : ADD . /app/
 ---> e7489bcc55a9
Step 5/7 : RUN set -uex;     bundle install;     yarn install
 ---> Running in b9d16dc8b002
+ bundle install
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
Fetching gem metadata from https://rubygems.org/............
Fetching public_suffix 3.0.3
Installing public_suffix 3.0.3
Fetching addressable 2.5.2
Installing addressable 2.5.2
Using bundler 1.17.2
Fetching coderay 1.1.2
Installing coderay 1.1.2
Fetching colorator 1.1.0
Installing colorator 1.1.0
Fetching concurrent-ruby 1.1.3
Installing concurrent-ruby 1.1.3
Fetching eventmachine 1.2.7
Installing eventmachine 1.2.7 with native extensions
Fetching http_parser.rb 0.6.0
Installing http_parser.rb 0.6.0 with native extensions
Fetching em-websocket 0.5.1
Installing em-websocket 0.5.1
Fetching ffi 1.9.25
Installing ffi 1.9.25 with native extensions
Fetching formatador 0.2.5
Installing formatador 0.2.5
Fetching forwardable-extended 2.6.0
Installing forwardable-extended 2.6.0
Fetching rb-fsevent 0.10.3
Installing rb-fsevent 0.10.3
Fetching rb-inotify 0.9.10
Installing rb-inotify 0.9.10
Fetching ruby_dep 1.5.0
Installing ruby_dep 1.5.0
Fetching listen 3.1.5
Installing listen 3.1.5
Fetching lumberjack 1.0.13
Installing lumberjack 1.0.13
Fetching nenv 0.3.0
Installing nenv 0.3.0
Fetching shellany 0.0.1
Installing shellany 0.0.1
Fetching notiffany 0.1.3
Installing notiffany 0.1.3
Fetching method_source 0.9.2
Installing method_source 0.9.2
Fetching pry 0.12.2
Installing pry 0.12.2
Fetching thor 0.20.3
Installing thor 0.20.3
Fetching guard 2.15.0
Installing guard 2.15.0
Fetching guard-compat 1.2.1
Installing guard-compat 1.2.1
Fetching multi_json 1.13.1
Installing multi_json 1.13.1
Fetching guard-livereload 2.5.2
Installing guard-livereload 2.5.2
Fetching i18n 0.9.5
Installing i18n 0.9.5
Fetching sass-listen 4.0.0
Installing sass-listen 4.0.0
Fetching sass 3.7.2
Installing sass 3.7.2
Fetching jekyll-sass-converter 1.5.2
Installing jekyll-sass-converter 1.5.2
Fetching jekyll-watch 2.1.2
Installing jekyll-watch 2.1.2
Fetching kramdown 1.17.0
Installing kramdown 1.17.0
Fetching liquid 4.0.1
Installing liquid 4.0.1
Fetching mercenary 0.3.6
Installing mercenary 0.3.6
Fetching pathutil 0.16.2
Installing pathutil 0.16.2
Fetching rouge 3.3.0
Installing rouge 3.3.0
Fetching safe_yaml 1.0.4
Installing safe_yaml 1.0.4
Fetching jekyll 3.7.4
Installing jekyll 3.7.4
Fetching jekyll-multiple-languages-plugin 1.6.0
Installing jekyll-multiple-languages-plugin 1.6.0
Fetching jekyll-postcss 0.2.2
Installing jekyll-postcss 0.2.2
Bundle complete! 6 Gemfile dependencies, 41 gems now installed.
Bundled gems are installed into `/usr/local/bundle`
Post-install message from sass:

Ruby Sass is deprecated and will be unmaintained as of 26 March 2019.

* If you use Sass as a command-line tool, we recommend using Dart Sass, the new
  primary implementation: https://sass-lang.com/install

* If you use Sass as a plug-in for a Ruby web framework, we recommend using the
  sassc gem: https://github.com/sass/sassc-ruby#readme

* For more details, please refer to the Sass blog:
  http://sass.logdown.com/posts/7081811

+ yarn install
yarn install v1.16.0
warning package.json: No license field
warning No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@1.2.9: The platform "linux" is incompatible with this module.
info "fsevents@1.2.9" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
Done in 5.06s.
Removing intermediate container b9d16dc8b002
 ---> ac341d99f072
Step 6/7 : EXPOSE 4000
 ---> Running in 1f6d24e1100f
Removing intermediate container 1f6d24e1100f
 ---> c0b6ca5a1dee
Step 7/7 : CMD ["bundle", "exec", "jekyll", "serve"]
 ---> Running in 4152c24435dc
Removing intermediate container 4152c24435dc
 ---> 29bb2da4d737
Successfully built 29bb2da4d737
Successfully tagged coopdevsgithubio_web:latest
Recreating coopdevsgithubio_web_1 ... done
Attaching to coopdevsgithubio_web_1
web_1  | Configuration file: /app/_config.yml
web_1  |             Source: /app
web_1  |        Destination: /app/_site
web_1  |  Incremental build: enabled
web_1  |       Generating... 
web_1  | Building site for default language: "ca" to: /app/_site
web_1  | Loading translation from file /app/_i18n/ca.yml
web_1  |   Conversion error: Jekyll::Converters::PostCss encountered an error while converting 'css/site.css':
web_1  |                     PostCssNotFoundError
web_1  | jekyll 3.7.4 | Error:  PostCssNotFoundError
coopdevsgithubio_web_1 exited with code 1
sauloperez commented 4 years ago

Oops, that's something different of what I thought because all npm packages get successfully installed by yarn apparently.

We might be missing something jekyll-postcss needs? Because I doubt the actual css is broken.

I can help much now but I'll take a look as soon as I can get back to my laptop.

El dv., 20 de des. 2019, 20:24, Enrico Stano notifications@github.com va escriure:

Thanks @sauloperez https://github.com/sauloperez , adding my user to docker group solved the sudo issue, but I still get the same error:

$ docker-compose up --build Building web Step 1/7 : FROM ruby:2.6-alpine ---> 3304101ccbe9 Step 2/7 : RUN apk update && apk upgrade && apk add --update --no-cache g++ musl-dev make libstdc++ yarn ---> Using cache ---> 69ac14122171 Step 3/7 : WORKDIR /app ---> Using cache ---> 3f2be994848b Step 4/7 : ADD . /app/ ---> e7489bcc55a9 Step 5/7 : RUN set -uex; bundle install; yarn install ---> Running in b9d16dc8b002

  • bundle install The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java. Fetching gem metadata from https://rubygems.org/............ Fetching public_suffix 3.0.3 Installing public_suffix 3.0.3 Fetching addressable 2.5.2 Installing addressable 2.5.2 Using bundler 1.17.2 Fetching coderay 1.1.2 Installing coderay 1.1.2 Fetching colorator 1.1.0 Installing colorator 1.1.0 Fetching concurrent-ruby 1.1.3 Installing concurrent-ruby 1.1.3 Fetching eventmachine 1.2.7 Installing eventmachine 1.2.7 with native extensions Fetching http_parser.rb 0.6.0 Installing http_parser.rb 0.6.0 with native extensions Fetching em-websocket 0.5.1 Installing em-websocket 0.5.1 Fetching ffi 1.9.25 Installing ffi 1.9.25 with native extensions Fetching formatador 0.2.5 Installing formatador 0.2.5 Fetching forwardable-extended 2.6.0 Installing forwardable-extended 2.6.0 Fetching rb-fsevent 0.10.3 Installing rb-fsevent 0.10.3 Fetching rb-inotify 0.9.10 Installing rb-inotify 0.9.10 Fetching ruby_dep 1.5.0 Installing ruby_dep 1.5.0 Fetching listen 3.1.5 Installing listen 3.1.5 Fetching lumberjack 1.0.13 Installing lumberjack 1.0.13 Fetching nenv 0.3.0 Installing nenv 0.3.0 Fetching shellany 0.0.1 Installing shellany 0.0.1 Fetching notiffany 0.1.3 Installing notiffany 0.1.3 Fetching method_source 0.9.2 Installing method_source 0.9.2 Fetching pry 0.12.2 Installing pry 0.12.2 Fetching thor 0.20.3 Installing thor 0.20.3 Fetching guard 2.15.0 Installing guard 2.15.0 Fetching guard-compat 1.2.1 Installing guard-compat 1.2.1 Fetching multi_json 1.13.1 Installing multi_json 1.13.1 Fetching guard-livereload 2.5.2 Installing guard-livereload 2.5.2 Fetching i18n 0.9.5 Installing i18n 0.9.5 Fetching sass-listen 4.0.0 Installing sass-listen 4.0.0 Fetching sass 3.7.2 Installing sass 3.7.2 Fetching jekyll-sass-converter 1.5.2 Installing jekyll-sass-converter 1.5.2 Fetching jekyll-watch 2.1.2 Installing jekyll-watch 2.1.2 Fetching kramdown 1.17.0 Installing kramdown 1.17.0 Fetching liquid 4.0.1 Installing liquid 4.0.1 Fetching mercenary 0.3.6 Installing mercenary 0.3.6 Fetching pathutil 0.16.2 Installing pathutil 0.16.2 Fetching rouge 3.3.0 Installing rouge 3.3.0 Fetching safe_yaml 1.0.4 Installing safe_yaml 1.0.4 Fetching jekyll 3.7.4 Installing jekyll 3.7.4 Fetching jekyll-multiple-languages-plugin 1.6.0 Installing jekyll-multiple-languages-plugin 1.6.0 Fetching jekyll-postcss 0.2.2 Installing jekyll-postcss 0.2.2 Bundle complete! 6 Gemfile dependencies, 41 gems now installed. Bundled gems are installed into /usr/local/bundle Post-install message from sass:

Ruby Sass is deprecated and will be unmaintained as of 26 March 2019.

  • If you use Sass as a command-line tool, we recommend using Dart Sass, the new primary implementation: https://sass-lang.com/install

  • If you use Sass as a plug-in for a Ruby web framework, we recommend using the sassc gem: https://github.com/sass/sassc-ruby#readme

  • For more details, please refer to the Sass blog: http://sass.logdown.com/posts/7081811

  • yarn install yarn install v1.16.0 warning package.json: No license field warning No license field [1/4] Resolving packages... [2/4] Fetching packages... info fsevents@1.2.9: The platform "linux" is incompatible with this module. info "fsevents@1.2.9" is an optional dependency and failed compatibility check. Excluding it from installation. [3/4] Linking dependencies... [4/4] Building fresh packages... Done in 5.06s. Removing intermediate container b9d16dc8b002 ---> ac341d99f072 Step 6/7 : EXPOSE 4000 ---> Running in 1f6d24e1100f Removing intermediate container 1f6d24e1100f ---> c0b6ca5a1dee Step 7/7 : CMD ["bundle", "exec", "jekyll", "serve"] ---> Running in 4152c24435dc Removing intermediate container 4152c24435dc ---> 29bb2da4d737 Successfully built 29bb2da4d737 Successfully tagged coopdevsgithubio_web:latest Recreating coopdevsgithubio_web_1 ... done Attaching to coopdevsgithubio_web_1 web_1 | Configuration file: /app/_config.yml web_1 | Source: /app web_1 | Destination: /app/_site web_1 | Incremental build: enabled web_1 | Generating... web_1 | Building site for default language: "ca" to: /app/_site web_1 | Loading translation from file /app/_i18n/ca.yml web_1 | Conversion error: Jekyll::Converters::PostCss encountered an error while converting 'css/site.css': web_1 | PostCssNotFoundError web_1 | jekyll 3.7.4 | Error: PostCssNotFoundError coopdevsgithubio_web_1 exited with code 1

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/coopdevs/coopdevs.github.io/issues/104?email_source=notifications&email_token=AAF2B2EGOL5X27EOPVRUIEDQZULYNA5CNFSM4J5K4LE2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHN52SY#issuecomment-568057163, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAF2B2CLT4WH7FKU4JVAHLLQZULYNANCNFSM4J5K4LEQ .

enricostano commented 4 years ago

https://github.com/mhanberg/jekyll-postcss/blob/b0665b55b64991597529cb61f5dd5a0cb005b202/lib/jekyll/converters/postcss.rb#L29

enricostano commented 4 years ago

Basically docker_compose.yml is broken, \app gets overridden while mounting the volume and yarn dependencies go bananas.

sauloperez commented 4 years ago

https://docs.docker.com/storage/volumes/#populate-a-volume-using-a-container#populate-a-volume-using-a-container seems to be the solution, based on https://stackoverflow.com/a/32785014