isolate network in docker
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
|
networks:
|
||||||
|
storycove-network:
|
||||||
|
driver: bridge
|
||||||
|
|
||||||
services:
|
services:
|
||||||
nginx:
|
nginx:
|
||||||
image: nginx:alpine
|
image: nginx:alpine
|
||||||
@@ -9,6 +13,8 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- frontend
|
- frontend
|
||||||
- backend
|
- backend
|
||||||
|
networks:
|
||||||
|
- storycove-network
|
||||||
|
|
||||||
frontend:
|
frontend:
|
||||||
build: ./frontend
|
build: ./frontend
|
||||||
@@ -16,6 +22,8 @@ services:
|
|||||||
- NEXT_PUBLIC_API_URL=http://backend:8080/api
|
- NEXT_PUBLIC_API_URL=http://backend:8080/api
|
||||||
depends_on:
|
depends_on:
|
||||||
- backend
|
- backend
|
||||||
|
networks:
|
||||||
|
- storycove-network
|
||||||
|
|
||||||
backend:
|
backend:
|
||||||
build: ./backend
|
build: ./backend
|
||||||
@@ -34,27 +42,31 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- postgres
|
- postgres
|
||||||
- typesense
|
- typesense
|
||||||
|
networks:
|
||||||
|
- storycove-network
|
||||||
|
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:15-alpine
|
image: postgres:15-alpine
|
||||||
ports:
|
# No port mapping - only accessible within the Docker network
|
||||||
- "5432:5432"
|
|
||||||
environment:
|
environment:
|
||||||
- POSTGRES_DB=storycove
|
- POSTGRES_DB=storycove
|
||||||
- POSTGRES_USER=storycove
|
- POSTGRES_USER=storycove
|
||||||
- POSTGRES_PASSWORD=${DB_PASSWORD}
|
- POSTGRES_PASSWORD=${DB_PASSWORD}
|
||||||
volumes:
|
volumes:
|
||||||
- postgres_data:/var/lib/postgresql/data
|
- postgres_data:/var/lib/postgresql/data
|
||||||
|
networks:
|
||||||
|
- storycove-network
|
||||||
|
|
||||||
typesense:
|
typesense:
|
||||||
image: typesense/typesense:0.25.0
|
image: typesense/typesense:0.25.0
|
||||||
ports:
|
# No port mapping - only accessible within the Docker network
|
||||||
- "8108:8108"
|
|
||||||
environment:
|
environment:
|
||||||
- TYPESENSE_API_KEY=${TYPESENSE_API_KEY}
|
- TYPESENSE_API_KEY=${TYPESENSE_API_KEY}
|
||||||
- TYPESENSE_DATA_DIR=/data
|
- TYPESENSE_DATA_DIR=/data
|
||||||
volumes:
|
volumes:
|
||||||
- typesense_data:/data
|
- typesense_data:/data
|
||||||
|
networks:
|
||||||
|
- storycove-network
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
postgres_data:
|
postgres_data:
|
||||||
|
|||||||
Reference in New Issue
Block a user