External storage was added
This commit is contained in:
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -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:
|
||||
args:
|
||||
BEERLOG_PORT: 8080
|
||||
network: host
|
||||
volumes:
|
||||
- ./storage-prod:/storage/
|
||||
ports:
|
||||
- 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):
|
||||
|
||||
Reference in New Issue
Block a user