Skip to content
Snippets Groups Projects
Commit 4097b56a authored by Elian Loraux's avatar Elian Loraux
Browse files

divers

parent eec9c6a2
No related branches found
No related tags found
No related merge requests found
File moved
......@@ -2,11 +2,11 @@ const express = require('express');
const multer = require('multer');
const app = express();
const port = 3000;
app.use('/static', express.static('uploads'));
app.use('/static', express.static('upload'));
const storage = multer.diskStorage({
destination: function (req, file, cb) {
cb(null, 'uploads/') // Make sure this folder exists
cb(null, 'upload/') // Make sure this folder exists
},
filename: function (req, file, cb) {
cb(null, file.fieldname + '-' + Date.now())
......
......@@ -4,12 +4,11 @@ services:
front:
build:
context: "docker/"
volumes:
- ${PWD}:/app
environment:
ENV:
volumes:
- ./upload:/upload
- ./app:/app
- ./app/upload:/app/upload
httpd:
hostname: expose-scene-uploads
......@@ -19,5 +18,5 @@ services:
- CORS_ALLOWED_HOSTS
- WEBPACK_MODE=production
volumes:
- ./upload:/srv
- ./app/upload:/srv
- ./Caddyfile:/etc/caddy/Caddyfile
#!/bin/bash
npm install
./cli post_install
if [ "$ENV" == "prod" ]; then
cmd="npm start"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment