-
Notifications
You must be signed in to change notification settings - Fork 5
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
Showing
3 changed files
with
221 additions
and
77 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,219 @@ | ||
version: '3.9' | ||
|
||
# Common Django template for GeoNode and Celery services below | ||
x-common-django: | ||
&default-common-django | ||
image: ghcr.io/gisdevio/iws/iws_django:floodmaps | ||
restart: on-failure | ||
env_file: | ||
- .env | ||
volumes: | ||
- statics:/mnt/volumes/statics | ||
- geoserver-data-dir:/geoserver_data/data | ||
- backup-restore:/backup_restore | ||
- data:/data | ||
- tmp:/tmp | ||
depends_on: | ||
db: | ||
condition: service_healthy | ||
geoserver: | ||
condition: service_healthy | ||
|
||
services: | ||
|
||
# Our custom django application. It includes Geonode. | ||
django: | ||
<< : *default-common-django | ||
container_name: django4${COMPOSE_PROJECT_NAME} | ||
healthcheck: | ||
test: "curl --fail --silent --write-out 'HTTP CODE : %{http_code}\n' --output /dev/null http://127.0.0.1:8001/" | ||
start_period: 60s | ||
interval: 60s | ||
timeout: 10s | ||
retries: 10 | ||
environment: | ||
- IS_CELERY=False | ||
entrypoint: ["/usr/src/iws/entrypoint.sh"] | ||
command: "uwsgi --ini /usr/src/iws/uwsgi.ini" | ||
|
||
# Celery worker that executes celery tasks created by Django. | ||
celery: | ||
<< : *default-common-django | ||
container_name: celery4${COMPOSE_PROJECT_NAME} | ||
depends_on: | ||
- django | ||
environment: | ||
- IS_CELERY=True | ||
entrypoint: ["/usr/src/iws/entrypoint.sh"] | ||
command: "celery-cmd" | ||
|
||
# Nginx is serving django static and media files and proxies to django and geonode | ||
geonode: | ||
image: ghcr.io/gisdevio/iws/iws_nginx:floodmaps | ||
# build: ./docker/nginx/ | ||
container_name: nginx4${COMPOSE_PROJECT_NAME} | ||
environment: | ||
- HTTPS_HOST=${HTTPS_HOST} | ||
- HTTP_HOST=${HTTP_HOST} | ||
- HTTPS_PORT=${HTTPS_PORT} | ||
- HTTP_PORT=${HTTP_PORT} | ||
- LETSENCRYPT_MODE=${LETSENCRYPT_MODE} | ||
- RESOLVER=127.0.0.11 | ||
ports: | ||
- "88:80" | ||
#- "${HTTPS_PORT}:443" | ||
volumes: | ||
- nginx-confd:/etc/nginx | ||
- nginx-certificates:/geonode-certificates | ||
- statics:/mnt/volumes/statics | ||
restart: on-failure | ||
|
||
# Geoserver backend | ||
geoserver: | ||
image: ghcr.io/cnr-ismar/iws/iws_geoserver:master | ||
container_name: geoserver4${COMPOSE_PROJECT_NAME} | ||
healthcheck: | ||
test: "curl --fail --silent --write-out 'HTTP CODE : %{http_code}\n' --output /dev/null http://127.0.0.1:8080/geoserver/rest/workspaces/geonode.html" | ||
start_period: 60s | ||
interval: 60s | ||
timeout: 10s | ||
retries: 10 | ||
env_file: | ||
- .env | ||
ports: | ||
- "8080:8080" | ||
volumes: | ||
- statics:/mnt/volumes/statics | ||
- geoserver-data-dir:/geoserver_data/data | ||
- backup-restore:/backup_restore | ||
- data:/data | ||
- tmp:/tmp | ||
restart: on-failure | ||
depends_on: | ||
db: | ||
condition: service_healthy | ||
data-dir-conf: | ||
condition: service_healthy | ||
|
||
data-dir-conf: | ||
image: geonode/geoserver_data:2.20.5 | ||
container_name: gsconf4${COMPOSE_PROJECT_NAME} | ||
entrypoint: sleep infinity | ||
volumes: | ||
- geoserver-data-dir:/geoserver_data/data | ||
restart: on-failure | ||
healthcheck: | ||
test: "ls -A '/geoserver_data/data' | wc -l" | ||
|
||
# PostGIS database. | ||
db: | ||
# use geonode official postgis 13 image | ||
image: ghcr.io/cnr-ismar/iws/iws_postgis:master | ||
command: postgres -c "max_connections=${POSTGRESQL_MAX_CONNECTIONS}" | ||
container_name: db4${COMPOSE_PROJECT_NAME} | ||
env_file: | ||
- .env | ||
volumes: | ||
- dbdata:/var/lib/postgresql/data | ||
- dbbackups:/pg_backups | ||
restart: on-failure | ||
healthcheck: | ||
test: "pg_isready -d postgres -U postgres" | ||
# uncomment to enable remote connections to postgres | ||
#ports: | ||
# - "5432:5432" | ||
|
||
# Vanilla RabbitMQ service. This is needed by celery | ||
rabbitmq: | ||
image: rabbitmq:3.7-alpine | ||
container_name: rabbitmq4${COMPOSE_PROJECT_NAME} | ||
volumes: | ||
- rabbitmq:/var/lib/rabbitmq | ||
restart: on-failure | ||
|
||
grafana: | ||
image: grafana/grafana | ||
restart: unless-stopped | ||
container_name: grafana4${COMPOSE_PROJECT_NAME} | ||
ports: | ||
- 3300:3000 | ||
expose: | ||
- "3000" | ||
environment: | ||
GF_SERVER_DOMAIN: iws.tools4msp.eu | ||
GF_SERVER_ROOT_URL: https://iws.tools4msp.eu.eu/measurements | ||
# true doesn't work value are hard coded in ini file | ||
GF_AUTH_ANONYMOUS_ENABLED: 'true' | ||
GF_SECURITY_ALLOW_EMBEDDING: 'true' | ||
GF_INSTALL_PLUGINS: grafana-worldmap-panel | ||
volumes: | ||
# - /opt/grafana-data:/var/lib/grafana | ||
- grafana-storage:/var/lib/grafana | ||
- /var/www/html:/var/www/html | ||
#- /home/gordini/thredds-panel/dist:/var/lib/grafana/plugins/thredds | ||
|
||
istorm: | ||
container_name: frontend4${COMPOSE_PROJECT_NAME} | ||
#image: 'repositories.inkode.it:4567/inkode/iws:latest' | ||
build: | ||
context: ./istorm | ||
dockerfile: Dockerfile | ||
args: | ||
HTTPS_PROXY: ${HTTPS_PROXY} | ||
HTTP_PROXY: ${HTTP_PROXY} | ||
restart: always | ||
ports: | ||
- 3003:3000 | ||
# command: npm run buildstart:docker | ||
env_file: | ||
- istorm/.env | ||
profiles: | ||
- istorm | ||
expose: | ||
- 3000 | ||
volumes: | ||
- ./istorm/app:/usr/src/app/app | ||
- ./istorm/build:/usr/src/app/build | ||
- ./istorm/internals:/usr/src/app/internals | ||
- ./istorm/package.json:/usr/src/app/package.json | ||
- ./istorm/babel.config.js:/usr/src/app/babel.config.js | ||
- ./istorm/.eslintrc.js:/usr/src/app/.eslintrc.js | ||
- ./istorm/.gitfake /usr/src/app/.git | ||
|
||
doc: | ||
image: ghcr.io/cnr-ismar/iws/iws_documentation:master | ||
build: | ||
context: ./docker/documentation/ | ||
dockerfile: Dockerfile | ||
container_name: doc${COMPOSE_PROJECT_NAME} | ||
profiles: | ||
- doc | ||
volumes: | ||
- statics:/mnt/volumes/statics | ||
|
||
|
||
volumes: | ||
# jenkins_data: | ||
# driver: local | ||
statics: | ||
name: ${COMPOSE_PROJECT_NAME}-statics | ||
nginx-confd: | ||
name: ${COMPOSE_PROJECT_NAME}-nginxconfd | ||
nginx-certificates: | ||
name: ${COMPOSE_PROJECT_NAME}-nginxcerts | ||
geoserver-data-dir: | ||
name: ${COMPOSE_PROJECT_NAME}-gsdatadir | ||
dbdata: | ||
name: ${COMPOSE_PROJECT_NAME}-dbdata | ||
dbbackups: | ||
name: ${COMPOSE_PROJECT_NAME}-dbbackups | ||
backup-restore: | ||
name: ${COMPOSE_PROJECT_NAME}-backup-restore | ||
data: | ||
name: ${COMPOSE_PROJECT_NAME}-data | ||
tmp: | ||
name: ${COMPOSE_PROJECT_NAME}-tmp | ||
rabbitmq: | ||
name: ${COMPOSE_PROJECT_NAME}-rabbitmq | ||
grafana-storage: | ||
name: ${COMPOSE_PROJECT_NAME}-grafana-storage |
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