Browse Source

Update docker's network configuration

pull/341/head
Hironsan 5 years ago
parent
commit
a8dabb87a8
3 changed files with 13 additions and 7 deletions
  1. 17
      docker-compose.prod.yml
  2. 1
      frontend/Dockerfile
  3. 2
      frontend/nuxt.config.js

17
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:

1
frontend/Dockerfile

@ -15,4 +15,3 @@ RUN npm install
# build project
RUN npm run build
RUN ls -l

2
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'
},
/*

Loading…
Cancel
Save