diff --git a/Dockerfile b/Dockerfile index 3b43c0c..3ad4d86 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,5 +4,3 @@ COPY ./requirements.txt /app RUN pip install -r requirements.txt COPY . /app/ -COPY ./wsgi.py /app/main.py -RUN rm /app/wsgi.py diff --git a/Dockerfile-dev b/Dockerfile-dev new file mode 100644 index 0000000..a0624a0 --- /dev/null +++ b/Dockerfile-dev @@ -0,0 +1,10 @@ +FROM tiangolo/uwsgi-nginx-flask:python3.7 + +WORKDIR /app + +COPY ./requirements.txt /app/ + +RUN pip install -r requirements.txt + + + diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml new file mode 100644 index 0000000..aa4be70 --- /dev/null +++ b/docker-compose-dev.yml @@ -0,0 +1,23 @@ +version: '3.2' + +services: + api22: + build: + context: ./ + dockerfile: Dockerfile-dev + container_name: api2.uwsgi-dev.web + hostname: api2-uwsgi.local + volumes: + - ./:/app + ports: + - "1881:80" + environment: + - SQLALCHEMY_DATABASE_URI=postgresql://fondberg:@docker.for.mac.localhost/photowall + - API_KEYS=[] + - DEBUG=True + # - SQLALCHEMY_TRACK_MODIFICATIONS=True # change in prestart.sh + +networks: + default: + external: + name: photowall-docker-network diff --git a/wsgi.py b/main.py similarity index 100% rename from wsgi.py rename to main.py diff --git a/uwsgi-reload b/uwsgi-reload new file mode 100644 index 0000000..e69de29 diff --git a/uwsgi.ini b/uwsgi.ini new file mode 100644 index 0000000..ba21356 --- /dev/null +++ b/uwsgi.ini @@ -0,0 +1,4 @@ +[uwsgi] +module = main +callable = app +touch-reload = uwsgi-reload