web-service/docker-compose.yml

161 lines
3.8 KiB
YAML

version: '3.8'
services:
nats:
container_name: fblx-nats
image: nats
ports:
- 4222:4222
- 6222:6222
- 8222:8222
networks:
- fblx
postgres:
container_name: fblx-postgres
image: postgres:15-alpine
environment:
- POSTGRES_MULTIPLE_DATABASES=auth,catalog,game,player,server,session
- POSTGRES_USER=freeblox
- POSTGRES_PASSWORD=FREEBLOXDataBaseDEV@123
volumes:
- ./database:/var/lib/postgresql/data
- ./docker/postgres:/docker-entrypoint-initdb.d
networks:
- fblx
auth:
container_name: fblx-auth
build:
context: .
dockerfile: Dockerfile.dev
args:
- SERVICE=auth
networks:
- fblx
environment:
- NATS_ENTRYPOINT=nats://nats:4222
- POSTGRES_HOST=postgres
- POSTGRES_USER=freeblox
- POSTGRES_PASSWORD=FREEBLOXDataBaseDEV@123
- PRIVATE_KEY_FILE=private/jwt.private.pem
- PUBLIC_KEY_FILE=private/jwt.public.pem
volumes:
- ./apps:/usr/src/app/apps
- ./libs:/usr/src/app/libs
- ./private:/usr/src/app/private
catalog:
container_name: fblx-catalog
build:
context: .
dockerfile: Dockerfile.dev
args:
- SERVICE=catalog
networks:
- fblx
environment:
- NATS_ENTRYPOINT=nats://nats:4222
- POSTGRES_HOST=postgres
- POSTGRES_USER=freeblox
- POSTGRES_PASSWORD=FREEBLOXDataBaseDEV@123
volumes:
- ./apps:/usr/src/app/apps
- ./libs:/usr/src/app/libs
game:
container_name: fblx-game
build:
context: .
dockerfile: Dockerfile.dev
args:
- SERVICE=game
networks:
- fblx
environment:
- NATS_ENTRYPOINT=nats://nats:4222
- POSTGRES_HOST=postgres
- POSTGRES_USER=freeblox
- POSTGRES_PASSWORD=FREEBLOXDataBaseDEV@123
volumes:
- ./apps:/usr/src/app/apps
- ./libs:/usr/src/app/libs
player:
container_name: fblx-player
build:
context: .
dockerfile: Dockerfile.dev
args:
- SERVICE=player
networks:
- fblx
environment:
- NATS_ENTRYPOINT=nats://nats:4222
- POSTGRES_HOST=postgres
- POSTGRES_USER=freeblox
- POSTGRES_PASSWORD=FREEBLOXDataBaseDEV@123
volumes:
- ./apps:/usr/src/app/apps
- ./libs:/usr/src/app/libs
server:
container_name: fblx-server
build:
context: .
dockerfile: Dockerfile.dev
args:
- SERVICE=server
networks:
- fblx
environment:
- NATS_ENTRYPOINT=nats://nats:4222
- POSTGRES_HOST=postgres
- POSTGRES_USER=freeblox
- POSTGRES_PASSWORD=FREEBLOXDataBaseDEV@123
volumes:
- ./apps:/usr/src/app/apps
- ./libs:/usr/src/app/libs
session:
container_name: fblx-session
build:
context: .
dockerfile: Dockerfile.dev
args:
- SERVICE=session
networks:
- fblx
environment:
- NATS_ENTRYPOINT=nats://nats:4222
- POSTGRES_HOST=postgres
- POSTGRES_USER=freeblox
- POSTGRES_PASSWORD=FREEBLOXDataBaseDEV@123
volumes:
- ./apps:/usr/src/app/apps
- ./libs:/usr/src/app/libs
web-service:
container_name: fblx-web-service
build:
context: .
dockerfile: Dockerfile.dev
args:
- SERVICE=freeblox-web-service
networks:
- fblx
ports:
- 4555:3000
environment:
- NATS_ENTRYPOINT=nats://nats:4222
volumes:
- ./apps:/usr/src/app/apps
- ./libs:/usr/src/app/libs
pgadmin:
container_name: fblx-pgadmin
image: dpage/pgadmin4
ports:
- 4556:80
networks:
- fblx
volumes:
- fblx-pgadmin:/var/lib/pgadmin
environment:
- PGADMIN_DEFAULT_EMAIL=freeblox@freeblox.gg
- PGADMIN_DEFAULT_PASSWORD=password
networks:
fblx:
volumes:
fblx-pgadmin: