Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error when cwd is read only #55

Closed
srghma opened this issue Jan 8, 2019 · 5 comments
Closed

error when cwd is read only #55

srghma opened this issue Jan 8, 2019 · 5 comments
Labels

Comments

@srghma
Copy link
Contributor

srghma commented Jan 8, 2019

With

docker-compose

  migrator:
    image: mkbucc/shmig:latest
    entrypoint: '' # i hate people that use custom entrypoints
    command: /bin/true # do nothing on `docker-compose up`
    working_dir: /migrations
    environment:
      TYPE:     postgresql
      LOGIN:    app_admin
      PASSWORD: app_admin_pass
      HOST:     postgres
      PORT:     5432
      DATABASE: gb_test
    volumes:
      - ../../migrations:/migrations:ro # READ-ONLY!!!, if i make it rw - error will dissappear 
      - ../../scripts/waitforit:/bin/waitforit:ro
      - ../../scripts/wait-for-postgres:/bin/wait-for-postgres:ro

makefile

feature_tests_dev_db_migrate:
	docker-compose \
		-p "$(PROJECT_NAME)_feature_tests_dev" \
		-f docker/feature_tests_dev.yml \
		run --rm migrator sh -c '\
		/bin/waitforit -host=$$HOST -port=$$PORT -timeout=10 && \
		DBNAME=postgres://$$LOGIN:$$PASSWORD@$$HOST:$$PORT/$$DATABASE /bin/wait-for-postgres && \
		shmig -m /migrations -C always migrate'

I'm gettirng error

/bin/shmig: line 169: 332874447.1.out: Read-only file system
srghma added a commit to srghma/shmig that referenced this issue Jan 8, 2019
srghma added a commit to srghma/shmig that referenced this issue Jan 8, 2019
@srghma
Copy link
Contributor Author

srghma commented Jan 8, 2019

FROM mkbucc/shmig:latest

RUN apk add --no-cache curl && \
  curl --header 'Accept: application/vnd.github.v3.raw' --output /bin/shmig --location https://raw.githubusercontent.com/mbucc/shmig/260a6aa0d9259e602fa497e9e42390df83a467f4/shmig

worked for me

@mbucc
Copy link
Owner

mbucc commented Jan 8, 2019

Thanks for all your input, it all looks good at first glance. I'll take a look this weekend.

@srghma
Copy link
Contributor Author

srghma commented Jan 8, 2019

this project needs travis ci and ability to run tests through docker-compose

I didn't run tests

@mbucc
Copy link
Owner

mbucc commented Jan 8, 2019

Just last night, I was looking at acme.sh as a good place to copy an approach from. If you have another suggestion, please attach a link.

mbucc added a commit that referenced this issue Jan 12, 2019
fix(#55): error when cwd is read only
@mbucc mbucc closed this as completed Jan 12, 2019
@mbucc mbucc added the bug label Jan 12, 2019
@mbucc
Copy link
Owner

mbucc commented Jan 29, 2019

this project needs travis ci

Done. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants