Browse Source

Merge pull request #1075 from doccano/fix/#836

Enable to login on remote machine
pull/1085/head
Hiroki Nakayama 4 years ago
committed by GitHub
parent
commit
aee0733820
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 22 additions and 1 deletions
  1. 2
      docker-compose.dev.yml
  2. 2
      docker-compose.prod.yml
  3. 10
      frontend/nuxt.config.js
  4. 1
      frontend/package.json
  5. 8
      frontend/yarn.lock

2
docker-compose.dev.yml

@ -25,6 +25,8 @@ services:
frontend:
image: node:13.7.0
command: ["/src/frontend/dev-nuxt.sh"]
environment:
API_URL: "http://backend:8000"
volumes:
- .:/src
- node_modules:/src/frontend/node_modules

2
docker-compose.prod.yml

@ -21,6 +21,8 @@ services:
frontend:
build: ./frontend
environment:
API_URL: "http://backend:8000"
volumes:
- www:/app/dist
environment:

10
frontend/nuxt.config.js

@ -32,7 +32,7 @@ export default {
},
env: {
baseUrl: process.env.NODE_ENV === 'production' ? '/v1' : 'http://127.0.0.1:8000/v1'
baseUrl: '/v1'
},
/*
@ -73,6 +73,14 @@ export default {
** See https://axios.nuxtjs.org/options
*/
axios: {
proxy: true
},
proxy: {
// Use a fake value for use at build-time
'/v1/': {
target: process.env.API_URL || 'http://127.0.0.1:12345'
}
},
/*
** vuetify module configuration

1
frontend/package.json

@ -16,6 +16,7 @@
},
"dependencies": {
"@nuxtjs/axios": "^5.12.0",
"@nuxtjs/proxy": "^2.0.1",
"@nuxtjs/vuetify": "^1.11.2",
"@toast-ui/vue-editor": "^1.1.1",
"chart.js": "^2.9.3",

8
frontend/yarn.lock

@ -1542,6 +1542,14 @@
consola "^2.11.3"
http-proxy-middleware "^1.0.4"
"@nuxtjs/proxy@^2.0.1":
version "2.0.1"
resolved "https://registry.yarnpkg.com/@nuxtjs/proxy/-/proxy-2.0.1.tgz#2469b6e316311aa8c60d348502a54bfe6d5536aa"
integrity sha512-RVZ6iYeAuWteot9oer3vTDCOEiTwg37Mqf6yy8vPD0QQaw4z3ykgM++MzfUl85jM14+qNnODZj5EATRoCY009Q==
dependencies:
consola "^2.11.3"
http-proxy-middleware "^1.0.4"
"@nuxtjs/vuetify@^1.11.2":
version "1.11.2"
resolved "https://registry.yarnpkg.com/@nuxtjs/vuetify/-/vuetify-1.11.2.tgz#fefa861d98c021e10dd579a5b91b34b3fb49dc99"

Loading…
Cancel
Save