mirror of
https://github.com/CivMC/Civ.git
synced 2026-07-15 23:20:44 +00:00
Add maven stack
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
loop:
|
||||
- traefik
|
||||
- auth
|
||||
- maven
|
||||
- monitoring
|
||||
- minecraft
|
||||
loop_control:
|
||||
|
||||
35
ansible/tasks/deploy/maven.yml
Normal file
35
ansible/tasks/deploy/maven.yml
Normal file
@@ -0,0 +1,35 @@
|
||||
- name: Maven | Create folder
|
||||
when:
|
||||
- "'swarm_manager' in group_names"
|
||||
- setting.maven.enabled
|
||||
file:
|
||||
path: /opt/stacks/maven
|
||||
state: directory
|
||||
|
||||
- name: Maven | Create volume folders
|
||||
when:
|
||||
- "'swarm_manager' in group_names"
|
||||
- setting.maven.enabled
|
||||
file:
|
||||
path: '{{item}}'
|
||||
state: directory
|
||||
loop:
|
||||
- /opt/stacks/maven/nexus-data
|
||||
|
||||
- name: Maven | Copy Stack
|
||||
when:
|
||||
- "'swarm_manager' in group_names"
|
||||
- setting.maven.enabled
|
||||
template:
|
||||
src: ../../templates/stacks/maven.yml
|
||||
dest: /opt/stacks/maven/maven.yml
|
||||
|
||||
- name: Maven | Deploy Stack
|
||||
when:
|
||||
- "'swarm_manager' in group_names"
|
||||
- setting.maven.enabled
|
||||
docker_stack:
|
||||
state: present
|
||||
name: maven
|
||||
compose:
|
||||
- /opt/stacks/maven/maven.yml
|
||||
36
ansible/templates/stacks/maven.yml
Normal file
36
ansible/templates/stacks/maven.yml
Normal file
@@ -0,0 +1,36 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
|
||||
nexus:
|
||||
image: sonatype/nexus3:latest
|
||||
restart: always
|
||||
networks:
|
||||
- traefik-public
|
||||
volumes:
|
||||
- /opt/stacks/maven/nexus-data:/nexus-data
|
||||
deploy:
|
||||
placement:
|
||||
constraints: [node.role == manager]
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.docker.network=traefik-public
|
||||
- traefik.constraint-label=traefik-public
|
||||
- traefik.http.routers.maven-public-http.rule=Host(`{{secret.maven.nexus.host}}`)
|
||||
- traefik.http.routers.maven-public-http.entrypoints=http
|
||||
- traefik.http.routers.maven-public-http.middlewares=https-redirect
|
||||
- traefik.http.routers.maven-public-https.rule=Host(`{{secret.maven.nexus.host}}`)
|
||||
- traefik.http.routers.maven-public-https.entrypoints=https
|
||||
- traefik.http.routers.maven-public-https.tls=true
|
||||
- traefik.http.routers.maven-public-https.tls.certresolver=le
|
||||
- traefik.http.services.maven-public.loadbalancer.server.port=8081
|
||||
logging:
|
||||
driver: grafana/loki-docker-driver
|
||||
options:
|
||||
loki-url: "http://localhost:3100/loki/api/v1/push"
|
||||
loki-retries: "5"
|
||||
loki-batch-size: "400"
|
||||
|
||||
networks:
|
||||
traefik-public:
|
||||
external: true
|
||||
@@ -12,6 +12,8 @@ settings:
|
||||
# Optional Stacks
|
||||
auth:
|
||||
enabled: false
|
||||
maven:
|
||||
enabled: false
|
||||
|
||||
production:
|
||||
<<: *default
|
||||
@@ -27,3 +29,5 @@ settings:
|
||||
memory: 8G
|
||||
auth:
|
||||
enabled: true # TODO: MOVE
|
||||
maven:
|
||||
enabled: true # TODO: MOVE
|
||||
|
||||
Reference in New Issue
Block a user