-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f6f4024
commit 14c5059
Showing
9 changed files
with
173 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
spring.jpa.database=POSTGRESQL | ||
spring.datasource.driverClassName=org.postgresql.Driver | ||
spring.datasource.platform=postgres | ||
spring.datasource.url=jdbc:postgresql://postgresql:5432/arrebol | ||
spring.datasource.username= | ||
spring.datasource.password= | ||
spring.jpa.generate-ddl=true | ||
spring.jpa.hibernate.ddl-auto=create |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"poolType":"docker", | ||
"properties": [ | ||
{ | ||
"key":"workerPoolSize", | ||
"value": 5 | ||
}, | ||
{ | ||
"key": "imageId", | ||
"value": "wesleymonte/simple-worker" | ||
}, | ||
{ | ||
"key": "resourceAddresses", | ||
"value": ["http://localhost:5555"] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
sudo docker stack deploy -c $(pwd)/docker-stack.yml lsd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
version: '3.7' | ||
services: | ||
postgresql: | ||
image: postgres | ||
env_file: ./postgres/postgres.env | ||
ports: | ||
- 5432:5432 | ||
networks: | ||
- iguassu-net | ||
volumes: | ||
- postgresdata:/var/lib/postgresql/data | ||
- ./postgres/init-db.sh:/docker-entrypoint-initdb.d/init-db.sh | ||
|
||
pgadmin: | ||
image: dpage/pgadmin4 | ||
env_file: ./pgadmin/pgadmin.env | ||
ports: | ||
- 15432:80 | ||
networks: | ||
- iguassu-net | ||
|
||
arrebol: | ||
image: ufcglsd/arrebol | ||
ports: | ||
- 8080:8080 | ||
networks: | ||
- iguassu-net | ||
volumes: | ||
- /var/run/docker.sock:/var/run/docker.sock | ||
- ./arrebol/arrebol.json:/service/config/arrebol.json | ||
- ./arrebol/application.properties:/service/config/application.properties | ||
deploy: | ||
mode: global | ||
restart_policy: | ||
condition: on-failure | ||
delay: 30s | ||
max_attempts: 3 | ||
|
||
iguassu: | ||
image: ufcglsd/iguassu | ||
ports: | ||
- 8081:8081 | ||
networks: | ||
- iguassu-net | ||
volumes: | ||
- ./iguassu/iguassu.conf:/service/config/iguassu.conf | ||
- ./iguassu/application.properties:/service/config/application.properties | ||
deploy: | ||
mode: replicated | ||
replicas: 1 | ||
restart_policy: | ||
condition: on-failure | ||
delay: 30s | ||
max_attempts: 3 | ||
|
||
iguassu-dashboard: | ||
image: ufcglsd/iguassu-dashboard | ||
ports: | ||
- 80:80 | ||
networks: | ||
- iguassu-net | ||
|
||
provider-service: | ||
image: wesleymonte/provider-service:queues | ||
ports: | ||
- 5000:5000 | ||
volumes: | ||
- ./provider/keys/pp:/service/keys/pp | ||
- ./provider/keys/pp.pub:/service/keys/pp.pub | ||
networks: | ||
- iguassu-net | ||
|
||
volumes: | ||
postgresdata: {} | ||
|
||
|
||
networks: | ||
iguassu-net: | ||
driver: overlay |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
server.servlet.context-path=/api/v2 | ||
server.port=8081 | ||
|
||
## PostgreSQL | ||
spring.jpa.database=POSTGRESQL | ||
spring.datasource.driverClassName=org.postgresql.Driver | ||
spring.datasource.platform=postgres | ||
spring.datasource.url=jdbc:postgresql://postgresql:5432/iguassu | ||
spring.datasource.username= | ||
spring.datasource.password= | ||
spring.jpa.generate-ddl=true | ||
spring.jpa.hibernate.ddl-auto=create |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
PGADMIN_DEFAULT_EMAIL= | ||
PGADMIN_DEFAULT_PASSWORD= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL | ||
CREATE DATABASE iguassu; | ||
CREATE DATABASE arrebol; | ||
GRANT ALL PRIVILEGES ON DATABASE iguassu TO "$POSTGRES_USER"; | ||
GRANT ALL PRIVILEGES ON DATABASE arrebol TO "$POSTGRES_USER"; | ||
EOSQL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
POSTGRES_USER= | ||
POSTGRES_PASSWORD= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/bash | ||
|
||
# A script to setup a swarm manager environment. | ||
# It expects to be run on Ubuntu 16.04 via 'sudo' | ||
|
||
install_docker() { | ||
echo "--> Installing docker" | ||
apt update | ||
|
||
apt-get install -y \ | ||
apt-transport-https \ | ||
ca-certificates \ | ||
curl \ | ||
software-properties-common | ||
|
||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | ||
|
||
apt-key fingerprint 0EBFCD88 | ||
|
||
add-apt-repository \ | ||
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \ | ||
$(lsb_release -cs) \ | ||
stable" | ||
|
||
apt-get update | ||
|
||
apt-get install -y docker-ce | ||
} | ||
|
||
run() { | ||
DOCKER_INSTALLED=$(dpkg -l | grep -c docker-ce) | ||
|
||
if ! [ $DOCKER_INSTALLED -ne 0 ]; then | ||
install_docker | ||
docker swarm init | ||
else | ||
echo "--> Docker already installed!" | ||
fi | ||
} | ||
|
||
run |