Skip to content

Commit

Permalink
upd server
Browse files Browse the repository at this point in the history
  • Loading branch information
strelok2012 committed Sep 29, 2019
1 parent 88fa50b commit 990ac67
Show file tree
Hide file tree
Showing 12 changed files with 82 additions and 747 deletions.
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
node_modules
gecko-upload-server
npm-debug.log
9 changes: 4 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
FROM node:8.7.0-alpine

RUN mkdir -p /srv/app/gecko-front
WORKDIR /srv/app/gecko-front
RUN mkdir -p /srv/app/gecko
WORKDIR /srv/app/gecko

COPY package*.json ./
RUN npm install

COPY . .
RUN npm run build

EXPOSE 4000

CMD ["npm", "run", "dev"]
CMD ["npm", "run", "server"]
12 changes: 1 addition & 11 deletions app/dataManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,9 @@ class dataManager {
}

saveDataToServer(data, filename) {
let url
if (process.env.UPLOAD_SERVER_ROOT) {
url = process.env.UPLOAD_SERVER_ROOT
} else {
url = window.location.protocol + '//' + window.location.hostname
if (process.env.GECKO_SERVER_HOST_PORT) {
url += ':' + process.env.GECKO_SERVER_HOST_PORT
}
}

this.$http({
method: 'POST',
url: url + '/upload_s3',
url: '/upload_s3',
headers: {
'Access-Control-Allow-Origin': true
},
Expand Down
2 changes: 1 addition & 1 deletion build/bundle.js

Large diffs are not rendered by default.

23 changes: 4 additions & 19 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ services:
# Setup node container
################################
server:
build: ./gecko-upload-server
build: ./
expose:
- ${GECKO_SERVER_HOST_PORT}
environment:
Expand All @@ -22,25 +22,10 @@ services:
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY}
AWS_COGNITO_POOL: ${AWS_COGNITO_POOL}
AWS_FOLDER: ${AWS_FOLDER}
networks:
- gecko
ports:
- ${GECKO_SERVER_HOST_PORT}:${GECKO_SERVER_CONTAINER_PORT}
command: npm run start

################################
# Setup client container
################################
client:
build: ./
expose:
- ${GECKO_APP_HOST_PORT}
environment:
GECKO_APP_HOST: ${GECKO_APP_HOST}
GECKO_APP_HOST_PORT: ${GECKO_APP_HOST_PORT}
GECKO_APP_CONTAINER_PORT: ${GECKO_APP_CONTAINER_PORT}
ports:
- ${GECKO_APP_HOST_PORT}:${GECKO_APP_CONTAINER_PORT}
networks:
- gecko
command: npm run dev
ports:
- ${GECKO_SERVER_HOST_PORT}:${GECKO_SERVER_CONTAINER_PORT}
command: npm run server
2 changes: 0 additions & 2 deletions gecko-upload-server/.dockerignore

This file was deleted.

13 changes: 0 additions & 13 deletions gecko-upload-server/Dockerfile

This file was deleted.

Loading

0 comments on commit 990ac67

Please sign in to comment.