docker integrated with poetry and persistence fixed

This commit is contained in:
Patrick Daly 2021-07-23 18:41:51 -07:00
parent 17c6138eae
commit bb4af4f16f
5 changed files with 11 additions and 14 deletions

View File

@ -11,9 +11,6 @@ WORKDIR /app/
RUN poetry install
# easy bruh...
#ENTRYPOINT ["./run.sh"]
# easter eggs 😝
RUN echo "PS1='🕵️:\[\033[1;36m\]\h \[\033[1;34m\]\W\[\033[0;35m\]\[\033[1;36m\]$ \[\033[0m\]'" >> ~/.bashrc

View File

@ -7,6 +7,7 @@ services:
- .env
volumes:
- .:/app
tty: true
db:
image: postgres:12

View File

@ -34,7 +34,8 @@ mypy = 'scripts.dev_tools:mypy'
black = 'scripts.dev_tools:black'
blackcheck = 'scripts.dev_tools:blackcheck'
start = 'scripts.dev_tools:start'
start_it = 'scripts.dev_tools:start_it'
start_background = 'scripts.dev_tools:start_background'
stop = 'scripts.dev_tools:stop'
build = 'scripts.dev_tools:build'
[tool.black]

6
run.sh
View File

@ -1,6 +0,0 @@
#!/bin/bash
# Source: https://github.com/docker/compose/issues/1926#issuecomment-505294443
# Ah, ha, ha, ha, stayin' alive...
while :; do :; done & kill -STOP $! && wait $!

View File

@ -22,10 +22,14 @@ def blackcheck():
check_call(['black', '--diff', '--color', '.'])
def start():
check_call(['docker', 'run', 'mev-inspect'])
check_call(['docker', 'compose', 'up'])
def start_background():
check_call(['docker', 'compose', 'up', '-d'])
def stop():
check_call(['docker', 'compose', 'down'])
def build():
check_call(['docker', 'build', '-t', 'mev-inspect', '.'])
check_call(['docker', 'compose', 'build'])
def start_it():
check_call(['docker', 'run', 'mev-inspect'])