Comments (7)
Phew...I manage to make it work. It was not the dip or docker problem, but Rails. Thanks for the quick responses @bibendi
from dip.
@joemsak tbh I don't remember. This was a long time ago, I should have written what was the issue in more details, but :)
I don't use dip anymore, switched to overmind. I still think that dip is awesome project, but overmind works better for my use case.
Sorry!
from dip.
Hi!
Can you give your docker-compose.yml and dip.yml?
from dip.
@bibendi ah sorry I should attach my docker-compose and dip when opening issue :)
docker-compose
version: '2.4'
services:
app: &app
build:
context: .
dockerfile: ./.dockerdev/Dockerfile
args:
RUBY_VERSION: '2.6.5'
PG_MAJOR: '11'
NODE_MAJOR: '12'
YARN_VERSION: '1.19.1'
BUNDLER_VERSION: '2.0.2'
image: fhirwire-dev:1.0.0
tmpfs:
- /tmp
backend: &backend
<<: *app
stdin_open: true
tty: true
volumes:
- .:/app:cached
- rails_cache:/app/tmp/cache
- bundle:/usr/local/bundle
- node_modules:/app/node_modules
- packs:/app/public/packs
- .dockerdev/.psqlrc:/root/.psqlrc:ro
environment:
- NODE_ENV=development
- RAILS_ENV=${RAILS_ENV:-development}
- REDIS_URL=redis://redis:6379/
- DATABASE_URL=postgres://postgres:postgres@postgres:5432
- BOOTSNAP_CACHE_DIR=/bundle/bootsnap
- WEBPACKER_DEV_SERVER_HOST=webpacker
- WEB_CONCURRENCY=1
- HISTFILE=/app/log/.bash_history
- PSQL_HISTFILE=/app/log/.psql_history
- EDITOR=vi
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
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'
sidekiq:
<<: *backend
command: bundle exec sidekiq -C config/sidekiq.yml
postgres:
image: postgres:10.10
volumes:
- .psqlrc:/root/.psqlrc:ro
- postgres:/var/lib/postgresql/data
- ./log:/root/log:cached
environment:
- PSQL_HISTFILE=/root/log/.psql_history
ports:
- 5432
healthcheck:
test: pg_isready -U postgres -h 127.0.0.1
interval: 5s
redis:
image: redis:3.2-alpine
volumes:
- redis:/data
ports:
- 6379
healthcheck:
test: redis-cli ping
interval: 1s
timeout: 3s
retries: 30
webpacker:
<<: *app
command: ./bin/webpack-dev-server
ports:
- '3035:3035'
volumes:
- .:/app:cached
- bundle:/usr/local/bundle
- node_modules:/app/node_modules
- 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:
bundle:
node_modules:
rails_cache:
packs:
dip.yml
version: '4.1'
environment:
RAILS_ENV: development
compose:
files:
- docker-compose.yml
interaction:
sh:
description: Open a Bash shell within a Rails container (with dependencies up)
service: backend
command: /bin/bash
bash:
description: Run an arbitrary script within a container (or open a shell without deps)
service: backend
command: /bin/bash
compose_run_options: [no-deps]
bundle:
description: Run Bundler commands
service: backend
command: bundle
compose_run_options: [no-deps]
rake:
description: Run Rake commands
service: backend
command: bundle exec rake
rails:
description: Run Rails commands
service: backend
command: bundle exec rails
subcommands:
s:
description: Run Rails server available at http://localhost:3000
service: rails
compose:
run_options: [service-ports, use-aliases]
'run-tests':
description: Run mini-test commands within test environment
service: backend
environment:
RAILS_ENV: test
command: bundle exec rails test
'run-tests:system':
description: Run mini-test commands within test environment
service: backend
environment:
RAILS_ENV: test
command: bundle exec rails test:system
rubocop:
service: backend
command: bundle exec rubocop
compose_run_options: [no-deps]
yarn:
service: backend
command: yarn
compose_run_options: [no-deps]
psql:
service: postgres
command: psql -h postgres -U postgres -d fhirwire_development
'redis-cli':
service: redis
command: redis-cli -h redis
provision:
- dip compose down --volumes
- dip compose up -d postgres redis
- dip bundle install
- dip yarn install
- dip rails db:create
- dip rails db:migrate
from dip.
Your configuration looks good!
Can you elaborate more on this: I try to debug with byebug or pry and when I try to write something to the logs ex; puts "lol" * 100 nothing happens.
I'm not sure that I quite understand what do you mean. It would be perfect if you make a screencast.
from dip.
@dixpac what was the solution? Logging "suddenly" stopped working right for me when I run dip rails s
(but not dip up web
) and I don't know what I changed
I can actually still use binding.pry
as expected but nothing happens after this:
% dip rails s
Creating otherconnection_web_run ... done
Puma starting in single mode...
* Puma version: 5.2.2 (ruby 3.0.0-p0) ("Fettisdagsbulle")
* Min threads: 5
* Max threads: 5
* Environment: development
* PID: 1
* Listening on http://0.0.0.0:3000
Use Ctrl-C to stop
No controller / request / action / rendering / sql logs, nothing.
from dip.
No worries thanks so much for writing back @dixpac
from dip.
Related Issues (20)
- dip provision fails if there is a space in the path name HOT 2
- Dip does not wrap an actual container command in quotes on Ubuntu HOT 4
- Since 7.1.2 `shell: false` commands with any argument fails with "undefined local variable or method `default_args' " HOT 2
- Docker compose v2 compat? HOT 8
- Question: Is there a way to use the 7+ version for non-ruby project? HOT 1
- question regarding description string HOT 1
- port forwardings in docker-compose.yml are not activated via dip HOT 2
- Can I use more than one provision or there have another way to run commands each by each? HOT 4
- `dip nginx` Default Image Change to `nginxproxy/nginx-proxy` HOT 1
- Doesn't work on MacOS Catalina HOT 3
- `docker-compose` is always used instead of `docker compose` HOT 2
- Latest version doesnt recognize the commands
- User Level Permissions by Default? HOT 1
- Feature request: DIP_ROOT_DIR env var
- Question: Is it possible to use Docker Compose profiles? HOT 3
- Make DIP_FILE relative path
- dip commands fails with psych error 'Tried to load unspecified class: Symbol (Psych::DisallowedClass)' HOT 4
- Feature request: Ability to remove environment HOT 1
- Current Docker host user UID special environment variable HOT 2
- replace nginx with traefik HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dip.