oktopus/devops/docker-compose.yaml
2024-02-17 12:45:11 -03:00

101 lines
2.2 KiB
YAML

services:
oktopustr369:
image: 'golang:1.21.4'
container_name: oktopustr369
tty: true
stdin_open: true
volumes:
- ../:/app/oktopus
command: bash -c "cd /app/oktopus/backend/services/controller && go run cmd/oktopus/main.go -mongo mongodb://172.16.235.2:27017 -a 172.16.235.4 -p 1883 -ws_addr 172.16.235.8"
ports:
- 8000:8000
depends_on:
- mongodb
- mochi
- websockets
networks:
usp_network:
ipv4_address: 172.16.235.7
mongodb:
image: mongo
container_name: mongodb_usp
networks:
usp_network:
ipv4_address: 172.16.235.2
redis:
image: redis
container_name: redis_usp
networks:
usp_network:
ipv4_address: 172.16.235.3
mochi:
image: 'golang:1.21.4'
container_name: mochi
tty: true
stdin_open: true
volumes:
- ../:/app/oktopus
command: bash -c "cd /app/oktopus/backend/services/mochi/cmd/ && go run main.go -redis 'redis:6379' -info :8081"
ports:
- 1883:1883
depends_on:
- redis
networks:
usp_network:
ipv4_address: 172.16.235.4
websockets:
image: 'golang:1.21.6'
container_name: websockets
tty: true
stdin_open: true
volumes:
- ../:/app/oktopus
command: bash -c "cd /app/oktopus/backend/services/ws/ && go run cmd/main.go"
ports:
- 8080:8080
networks:
usp_network:
ipv4_address: 172.16.235.8
socketio:
image: 'node:16.20.2'
container_name: socketio
tty: true
stdin_open: true
volumes:
- ../:/app/oktopus
command: bash -c "cd /app/oktopus/backend/services/socketio/ && npm i && node server.js"
ports:
- 5000:5000
networks:
usp_network:
ipv4_address: 172.16.235.5
frontend:
image: 'node:16.20.2'
container_name: frontend
tty: true
stdin_open: true
volumes:
- ../:/app/oktopus
command: bash -c "cd /app/oktopus/frontend && npm i && npm run dev"
ports:
- 3000:3000
networks:
usp_network:
ipv4_address: 172.16.235.6
networks:
usp_network:
driver: bridge
ipam:
driver: default
config:
- subnet: 172.16.235.0/24
gateway: 172.16.235.1