diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 86bc6b72..0e00c7c6 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -12,10 +12,11 @@ services: ADMIN_EMAIL: "admin@example.com" DATABASE_URL: "postgres://doccano:doccano@postgres:5432/doccano?sslmode=disable" ALLOW_SIGNUP: "False" - ports: - - 8000:8000 depends_on: - postgres + networks: + - network-backend + - network-frontend frontend: build: ./frontend @@ -28,9 +29,11 @@ services: - static_volume:/home/app/web/staticfiles - www:/var/www/html:ro ports: - - 1337:80 + - 80:80 depends_on: - backend + networks: + - network-frontend postgres: image: postgres:12.0-alpine @@ -40,10 +43,14 @@ services: POSTGRES_USER: "doccano" POSTGRES_PASSWORD: "doccano" POSTGRES_DB: "doccano" - ports: - - 5432:5432 + networks: + - network-backend volumes: postgres_data: static_volume: www: + +networks: + network-backend: + network-frontend: diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 1a6eb8be..48889d5b 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -15,4 +15,3 @@ RUN npm install # build project RUN npm run build -RUN ls -l \ No newline at end of file diff --git a/frontend/nuxt.config.js b/frontend/nuxt.config.js index 79fbc168..2fba8c7e 100644 --- a/frontend/nuxt.config.js +++ b/frontend/nuxt.config.js @@ -31,7 +31,7 @@ export default { ], env: { - baseUrl: process.env.NODE_ENV !== 'production' ? '/v1' : 'http://127.0.0.1:8000/v1' + baseUrl: process.env.NODE_ENV === 'production' ? '/v1' : 'http://127.0.0.1:8000/v1' }, /*