Verified Commit 49f4e2ef authored by Grégor JOUET's avatar Grégor JOUET 🔧
Browse files

Set data folder

parent 52c8c8a4
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -62,7 +62,7 @@ app.config["JWT_ALGORITHM"] = "RS256"
app.config["JWT_IDENTITY_CLAIM"] = "login_name"
print(app.config["JWT_PUBLIC_KEY"])

FILE_SAVE_PATH = "../ui/static/files"
FILE_SAVE_PATH = "/data"
os.makedirs(FILE_SAVE_PATH, exist_ok=True)

jwt = JWTManager(app)
+5 −0
Original line number Diff line number Diff line
@@ -33,6 +33,11 @@ http {
            proxy_pass    http://localhost:5000/;
        }

        location /files/ {
            root /data;
            try_files $uri /uknown;
        }

        location / {
            include  /etc/nginx/mime.types;
            root /app/ui/dist;
+2 −0
Original line number Diff line number Diff line
@@ -12,6 +12,8 @@ services:
      - MYSQL_PASSWORD=password
      - NODE_ENV=production
    restart: always
    volumes:
      - ./files:/data
    links:
      - db

+2 −2
Original line number Diff line number Diff line
@@ -221,10 +221,10 @@ export default {
    },
    infos() {},
    stl_path() {
      return `static/files/${this.stl}`; //! FIXME base url
      return `/myfab/files/${this.stl}`; //! FIXME base url
    },
    gcode_path() {
      return `static/files/${this.gcode}`; //! FIXME base url
      return `/myfab/files/${this.gcode}`; //! FIXME base url
    },
    show_gcode() {
      return this.gcode != null && this.gcode != "";