@@ -0,0 +1,2 @@
+storage-dev/*
+storage-prod/*
@@ -5,7 +5,6 @@ RUN pip install websockets
WORKDIR /beerlog-srv
COPY beerlog-srv.py .
COPY storage.py .
-COPY users.obj .
ARG BEERLOG_PORT
ENV BEERLOG_PORT $BEERLOG_PORT
@@ -9,6 +9,8 @@ services:
args:
BEERLOG_PORT: 8000
network: host
+ volumes:
+ - ./storage-dev:/storage/
ports:
- 8000:8000
beerlog-srv-prod:
@@ -19,6 +21,8 @@ services:
BEERLOG_PORT: 8080
+ - ./storage-prod:/storage/
- 8080:8080
@@ -7,7 +7,7 @@ class Storage():
objects = {}
def __init__(self, name):
- self.name = f"./{name}.obj"
+ self.name = f"/storage/{name}.obj"
self._load()
def _load(self):