BrianGilbert / docksal-core-sprint

4 stars 2 forks source link

Maybe use pip to install docker-compose? #2

Open mradcliffe opened 7 years ago

mradcliffe commented 7 years ago

I've been having success with the following pattern for docker-compose:

A Makefile with

all:
        make -s install

clean:
        rm -fr env

install:
        test -d env || pyvenv env
        if [ ! -d env/lib/python3*/site-packages/bs4 ]; then \
                . env/bin/activate && pip install -r requirements.txt; \
        fi

and a requirements.txt with

docker-compose==1.12.0

Then I can do . env/bin/activate and run fin init from there. If I'm not using that Python env anymore I run env/bin/deactivate.