You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

81 lines
1.8 KiB
YAML

version: '3.4'
services:
blog_frontend_server:
build: ./frontend
restart: always
container_name: "blog_frontend_server"
ports:
- 3000:3000
networks:
myblog-network:
ipv4_address: 10.50.20.4
blog_api_server:
image: "blog_api_server"
container_name: "blog_api_server"
build: ./api_server
environment:
REDIRECT_SERVER: "10.50.20.7:8080"
CONTENT_SERVER: "10.50.20.6:13379"
SQLALCHEMY_DATABASE_URI: "postgresql://postgres:postgres@10.50.20.8:5432/mydb"
ports:
- 13377:13377
restart: always
networks:
myblog-network:
ipv4_address: 10.50.20.5
depends_on:
- db
blog_content_server:
image: "blog_content_server"
container_name: "blog_content_server"
build: ./content_server
expose:
- 13379
restart: always
networks:
myblog-network:
ipv4_address: 10.50.20.6
blog_redirector_server:
image: "blog_redirector_server"
container_name: "blog_redirector_server"
build: ./redirector
environment:
SQLALCHEMY_DATABASE_URI: "postgresql://postgres:postgres@10.50.20.8:5432/mydb"
restart: always
expose:
- 8080
networks:
myblog-network:
ipv4_address: 10.50.20.7
depends_on:
- db
db:
image: postgres:14.5
container_name: "blog_postgres_server"
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=mydb
restart: always
expose:
- 5432
networks:
myblog-network:
ipv4_address: 10.50.20.8
# command: mongod --logpath=/dev/null # --quiet
networks:
myblog-network:
driver: bridge
ipam:
driver: default
config:
- subnet: 10.50.20.0/24
gateway: 10.50.20.1