diff --git a/.dockerignore b/.dockerignore index cd74655e..88d9f11f 100644 --- a/.dockerignore +++ b/.dockerignore @@ -17,6 +17,9 @@ dev/* /.idea /.git +# volume mounts +local_art + # misc .DS_Store .env.local diff --git a/Dockerfile b/Dockerfile index 0216fe5a..613a8001 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,4 +4,3 @@ FROM nginx:1.21-alpine as prod EXPOSE 4242 COPY . /usr/share/nginx/html/ COPY app.conf /etc/nginx/nginx.conf - diff --git a/Makefile b/Makefile index 5475649e..dda72031 100644 --- a/Makefile +++ b/Makefile @@ -1,2 +1,19 @@ +.PHONY: start stop + start: - docker build -f Dockerfile --target "prod" . -t "cardconjurer-client" && docker run -dit -h 127.0.0.1 -p 4242:4242 "cardconjurer-client" + docker build \ + --file Dockerfile \ + --target "prod" \ + --tag "cardconjurer-client" \ + . && \ + docker run \ + --detach \ + --hostname 127.0.0.1 \ + --publish 4242:4242 \ + --name cardconjurer-client \ + --volume ./:/usr/share/nginx/html/:ro \ + "cardconjurer-client" + +stop: + docker stop cardconjurer-client && \ + docker rm cardconjurer-client