generator-springboot-api
Version:
SpringBoot REST API Generator
184 lines • 4.24 kB
YAML
version: "3.7"
services:<% if (metricsinflux) { %>
influxdb:
image: influxdb:1.7.5-alpine
ports:
- 8086:8086
networks:
- backend
volumes:
- influxdbdata:/var/lib/influxdb
deploy:
resources:
limits:
cpus: '0.50'
memory: 256M
reservations:
cpus: '0.20'
memory: 128M
mode: replicated
replicas: 1
placement:
constraints: [node.role == manager]<% } if (postgres) { %>
postgres:
image: postgres:11.2-alpine
ports:
- 5432:5432
networks:
- backend
volumes:
- postgresdata:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=<%=randomPasswd%>
deploy:
resources:
limits:
cpus: '1.0'
memory: 512M
reservations:
cpus: '0.50'
memory: 256M
mode: replicated
replicas: 1
placement:
constraints: [node.role == manager]<% } if (oracle) {%>
oracle:
image: wnameless/oracle-xe-11g-r2
ports:
- 1521:1521
networks:
- backend
# volumes:
# - oracledata:/var/lib/postgresql/data
environment:
- ORACLE_ALLOW_REMOTE=true
- ORACLE_DISABLE_ASYNCH_IO=true
deploy:
resources:
limits:
cpus: '1.0'
memory: 512M
reservations:
cpus: '0.50'
memory: 256M
mode: replicated
replicas: 1
placement:
constraints: [node.role == manager]<% } if (redis) { %>
redis:
image: redis:5.0.4-alpine
ports:
- 6379:6379
networks:
- backend
volumes:
- redisdata:/data
deploy:
resources:
limits:
cpus: '1.0'
memory: 512M
reservations:
cpus: '0.50'
memory: 256M
mode: replicated
replicas: 1<% } if (mongo) { %>
mongodb:
image: bitnami/mongodb:4.1
environment:
- MONGODB_USERNAME=<%=artifact%>
- MONGODB_PASSWORD=<%=randomPasswd%>
- MONGODB_DATABASE=<%=artifact%>
ports:
- 27017:27017
networks:
- backend
volumes:
- mongodbdata:/bitnami
deploy:
resources:
limits:
cpus: '1.0'
memory: 512M
reservations:
cpus: '0.50'
memory: 256M
mode: replicated
replicas: 1
placement:
constraints: [node.role == manager]<% } if (rabbit) { %>
rabbitmq:
image: rabbitmq:3.7.14-management-alpine
ports:
- 5672:5672
- 15672:15672
environment:
- RABBITMQ_DEFAULT_USER=<%=artifact%>
- RABBITMQ_DEFAULT_PASS=<%=randomPasswd%>
networks:
- message
volumes:
- rabbitdata:/var/lib/rabbitmq
deploy:
resources:
limits:
cpus: '1.0'
memory: 512M
reservations:
cpus: '0.50'
memory: 256M
mode: replicated
replicas: 1
placement:
constraints: [node.role == manager]<% } if (kafka) { %>
kafka:
image: spotify/kafka
environment:
- ADVERTISED_HOST=localhost
- ADVERTISED_PORT=9092
ports:
- 2181:2181
- 9092:9092
networks:
- message
deploy:
resources:
limits:
cpus: '1.0'
memory: 512M
reservations:
cpus: '0.50'
memory: 256M
mode: replicated
replicas: 1
placement:
constraints: [node.role == manager]<% } if (mqtt) { %>
mqtt:
image: eclipse-mosquitto:1.6.8
networks:
- message
ports:
- 1883:1883
deploy:
resources:
limits:
cpus: '0.50'
memory: 64M
reservations:
cpus: '0.25'
memory: 64M
mode: replicated
replicas: 1
placement:
constraints: [node.role == manager]<% } %>
networks:
frontend:<% if (postgres || mongo || metricsinflux) { %>
backend:<% } if (kafka || rabbit || mqtt) { %>
message:<% } %>
volumes: <% if (postgres) { %>
postgresdata: <% } if (redis) { %>
redisdata: <% } if (mongo) { %>
mongodbdata: <% } if (rabbit) { %>
rabbitdata: <% } if (metricsinflux) { %>
influxdbdata: <% } if (oracle) { %>
oracledata: <% } %>