-
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:FORTH-ICS-INSPIRE/artemis
- Loading branch information
Showing
10 changed files
with
369 additions
and
5 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
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,231 @@ | ||
version: '3' | ||
services: | ||
testcafe: | ||
image: testcafe/testcafe:latest | ||
container_name: testcafe | ||
depends_on: | ||
- backend | ||
- frontend | ||
network_mode: host | ||
entrypoint: ["/bin/sh", "-c"] | ||
command: ["sleep 60s && testcafe chromium:headless /tests/**/*.js"] | ||
volumes: | ||
- ./testcafe/tests:/tests | ||
backend: | ||
image: artemis_backend | ||
build: ./backend/ | ||
container_name: backend | ||
depends_on: | ||
- rabbitmq | ||
- postgres | ||
- monitor | ||
networks: | ||
- artemis | ||
expose: | ||
- ${BACKEND_SUPERVISOR_PORT} | ||
environment: | ||
ARTEMIS_WEB_HOST: ${ARTEMIS_WEB_HOST} | ||
RABBITMQ_USER: ${RABBITMQ_USER} | ||
RABBITMQ_PASS: ${RABBITMQ_PASS} | ||
RABBITMQ_HOST: ${RABBITMQ_HOST} | ||
RABBITMQ_PORT: ${RABBITMQ_PORT} | ||
DB_USER: ${DB_USER} | ||
DB_PASS: ${DB_PASS} | ||
DB_HOST: ${DB_HOST} | ||
DB_PORT: ${DB_PORT} | ||
DB_NAME: ${DB_NAME} | ||
DB_VERSION: ${DB_VERSION} | ||
BACKEND_SUPERVISOR_HOST: ${BACKEND_SUPERVISOR_HOST} | ||
BACKEND_SUPERVISOR_PORT: ${BACKEND_SUPERVISOR_PORT} | ||
MON_SUPERVISOR_HOST: ${MON_SUPERVISOR_HOST} | ||
MON_SUPERVISOR_PORT: ${MON_SUPERVISOR_PORT} | ||
REDIS_HOST: ${REDIS_HOST} | ||
REDIS_PORT: ${REDIS_PORT} | ||
HASURA_HOST: ${HASURA_HOST} | ||
HASURA_PORT: ${HASURA_PORT} | ||
HASURA_GRAPHQL_ACCESS_KEY: ${HASURA_SECRET_KEY} | ||
GUI_ENABLED: ${GUI_ENABLED} | ||
HIJACK_LOG_FILTER: ${HIJACK_LOG_FILTER} | ||
MON_TIMEOUT_LAST_BGP_UPDATE: ${MON_TIMEOUT_LAST_BGP_UPDATE} | ||
# for backwards compatibility | ||
SUPERVISOR_HOST: ${BACKEND_SUPERVISOR_HOST} | ||
SUPERVISOR_PORT: ${BACKEND_SUPERVISOR_PORT} | ||
HISTORIC: ${HISTORIC} | ||
HIJACK_LOG_FIELDS: ${HIJACK_LOG_FIELDS} | ||
monitor: | ||
image: artemis_monitor | ||
build: ./monitor/ | ||
container_name: monitor | ||
depends_on: | ||
- rabbitmq | ||
networks: | ||
- artemis | ||
expose: | ||
- ${MON_SUPERVISOR_PORT} | ||
environment: | ||
RABBITMQ_USER: ${RABBITMQ_USER} | ||
RABBITMQ_PASS: ${RABBITMQ_PASS} | ||
RABBITMQ_HOST: ${RABBITMQ_HOST} | ||
RABBITMQ_PORT: ${RABBITMQ_PORT} | ||
DB_USER: ${DB_USER} | ||
DB_PASS: ${DB_PASS} | ||
DB_HOST: ${DB_HOST} | ||
DB_PORT: ${DB_PORT} | ||
DB_NAME: ${DB_NAME} | ||
RIS_ID: ${RIS_ID} | ||
BACKEND_SUPERVISOR_HOST: ${BACKEND_SUPERVISOR_HOST} | ||
BACKEND_SUPERVISOR_PORT: ${BACKEND_SUPERVISOR_PORT} | ||
MON_SUPERVISOR_HOST: ${MON_SUPERVISOR_HOST} | ||
MON_SUPERVISOR_PORT: ${MON_SUPERVISOR_PORT} | ||
REDIS_HOST: ${REDIS_HOST} | ||
REDIS_PORT: ${REDIS_PORT} | ||
HISTORIC: ${HISTORIC} | ||
frontend: | ||
image: artemis_frontend | ||
build: ./frontend/ | ||
container_name: frontend | ||
depends_on: | ||
- rabbitmq | ||
- postgres | ||
- postgrest | ||
- backend | ||
- monitor | ||
networks: | ||
- artemis | ||
expose: | ||
- ${WEBAPP_PORT} | ||
environment: | ||
RABBITMQ_USER: ${RABBITMQ_USER} | ||
RABBITMQ_PASS: ${RABBITMQ_PASS} | ||
RABBITMQ_HOST: ${RABBITMQ_HOST} | ||
RABBITMQ_PORT: ${RABBITMQ_PORT} | ||
DB_HOST: ${DB_HOST} | ||
DB_PORT: ${DB_PORT} | ||
API_HOST: ${API_HOST} | ||
API_PORT: ${API_PORT} | ||
HASURA_HOST: ${HASURA_HOST} | ||
HASURA_PORT: ${HASURA_PORT} | ||
SYSTEM_VERSION: ${SYSTEM_VERSION} | ||
BIND_IP: ${BIND_IP} | ||
WEBAPP_PORT: ${WEBAPP_PORT} | ||
USER_ROOT_USERNAME: ${ADMIN_USER} | ||
USER_ROOT_PASSWORD: ${ADMIN_PASS} | ||
USER_ROOT_EMAIL: ${ADMIN_EMAIL} | ||
BACKEND_SUPERVISOR_HOST: ${BACKEND_SUPERVISOR_HOST} | ||
BACKEND_SUPERVISOR_PORT: ${BACKEND_SUPERVISOR_PORT} | ||
MON_SUPERVISOR_HOST: ${MON_SUPERVISOR_HOST} | ||
MON_SUPERVISOR_PORT: ${MON_SUPERVISOR_PORT} | ||
JWT_SECRET_KEY: ${JWT_SECRET_KEY} | ||
FLASK_SECRET_KEY: ${FLASK_SECRET_KEY} | ||
JS_VERSION: ${JS_VERSION} | ||
SECURITY_PASSWORD_SALT: ${SECURITY_PASSWORD_SALT} | ||
# for backwards compatibility | ||
SUPERVISOR_HOST: ${BACKEND_SUPERVISOR_HOST} | ||
SUPERVISOR_PORT: ${BACKEND_SUPERVISOR_PORT} | ||
nginx: | ||
image: nginx:1.15-alpine | ||
container_name: nginx | ||
restart: always | ||
depends_on: | ||
- frontend | ||
- postgrest | ||
networks: | ||
- artemis | ||
expose: | ||
- 8080 # HTTP | ||
- 8443 # HTTPS | ||
ports: | ||
- "8080:8080" | ||
- "8443:8443" | ||
volumes: | ||
- ./testcafe/configs/nginx.conf:/etc/nginx/nginx.conf | ||
- ./frontend/webapp/configs/certs/:/etc/nginx/certs/ | ||
rabbitmq: | ||
image: rabbitmq:3.7.8-management-alpine | ||
container_name: rabbitmq | ||
restart: always | ||
networks: | ||
- artemis | ||
expose: | ||
- ${RABBITMQ_PORT} | ||
# - 15672 management port | ||
environment: | ||
RABBITMQ_DEFAULT_USER: ${RABBITMQ_USER} | ||
RABBITMQ_DEFAULT_PASS: ${RABBITMQ_PASS} | ||
volumes: | ||
- ./other/rabbitmq/enabled-plugins:/etc/rabbitmq/enabled_plugins | ||
postgres: | ||
image: timescale/timescaledb:1.1.0-pg10 | ||
container_name: postgres | ||
restart: always | ||
networks: | ||
- artemis | ||
expose: | ||
- ${DB_PORT} | ||
environment: | ||
POSTGRES_DB: ${DB_NAME} | ||
POSTGRES_USER: ${DB_USER} | ||
POSTGRES_PASSWORD: ${DB_PASS} | ||
DB_BACKUP: ${DB_BACKUP} | ||
DB_AUTOCLEAN: ${DB_AUTOCLEAN} | ||
DB_HIJACK_DORMANT: ${DB_HIJACK_DORMANT} | ||
volumes: | ||
- ./other/postgres-entrypoint.sh:/postgres-entrypoint.sh | ||
- ./other/db/init.sql:/docker-entrypoint-initdb.d/zinit.sql | ||
- ./other/db/data/:/docker-entrypoint-initdb.d/data/ | ||
- ./other/db/libs/:/docker-entrypoint-initdb.d/libs/ | ||
entrypoint: ["./postgres-entrypoint.sh"] | ||
postgrest: | ||
image: postgrest/postgrest:v5.2.0 | ||
container_name: postgrest | ||
restart: always | ||
depends_on: | ||
- postgres | ||
- backend | ||
networks: | ||
- artemis | ||
expose: | ||
- ${API_PORT} | ||
environment: | ||
PGRST_DB_URI: postgres://${DB_USER}:${DB_PASS}@${DB_HOST}:${DB_PORT}/${DB_NAME} | ||
PGRST_DB_SCHEMA: ${DB_SCHEMA} | ||
PGRST_DB_ANON_ROLE: ${DB_USER} | ||
pg-amqp-bridge: | ||
image: subzerocloud/pg-amqp-bridge:0.0.6 | ||
container_name: pg-amqp-bridge | ||
depends_on: | ||
- postgres | ||
- backend | ||
- rabbitmq | ||
networks: | ||
- artemis | ||
environment: | ||
- POSTGRESQL_URI=postgres://${DB_USER}:${DB_PASS}@${DB_HOST}:${DB_PORT}/${DB_NAME} | ||
- AMQP_URI=amqp://${RABBITMQ_USER}:${RABBITMQ_PASS}@${RABBITMQ_HOST}:${RABBITMQ_PORT}// | ||
- BRIDGE_CHANNELS=events:amq.direct | ||
# - RUST_LOG=debug | ||
# - RUST_BACKTRACE=1 | ||
volumes: | ||
- ./backend/wait-for:/root/wait-for | ||
command: ["/root/wait-for", "${RABBITMQ_HOST}:${RABBITMQ_PORT}", "-t", "0", "--", "pg-amqp-bridge"] | ||
graphql: | ||
image: hasura/graphql-engine:v1.0.0-alpha45 | ||
container_name: graphql | ||
restart: always | ||
depends_on: | ||
- postgres | ||
networks: | ||
- artemis | ||
expose: | ||
- ${HASURA_PORT} | ||
environment: | ||
HASURA_GRAPHQL_DATABASE_URL: postgres://${DB_USER}:${DB_PASS}@${DB_HOST}:${DB_PORT}/${DB_NAME} | ||
HASURA_GRAPHQL_ACCESS_KEY: ${HASURA_SECRET_KEY} | ||
HASURA_GRAPHQL_ENABLE_CONSOLE: ${HASURA_GUI} | ||
HASURA_GRAPHQL_JWT_SECRET: '{"type":"HS256", "key":"${JWT_SECRET_KEY}"}' | ||
command: | ||
- graphql-engine | ||
- serve | ||
|
||
networks: | ||
artemis: |
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
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
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
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
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
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
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,61 @@ | ||
worker_processes 1; | ||
|
||
events { worker_connections 1024; } | ||
|
||
http { | ||
|
||
server { | ||
listen 8080 default_server; | ||
server_name _; | ||
return 301 https://$host$request_uri; | ||
} | ||
|
||
server { | ||
listen 8443 ssl; | ||
resolver localhost; | ||
error_page 497 https://$host:$server_port$request_uri; | ||
|
||
location = /api/graphql { | ||
proxy_pass http://graphql:8080/v1alpha1/graphql; | ||
proxy_redirect off; | ||
proxy_http_version 1.1; | ||
proxy_set_header Host $host:$server_port; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header Upgrade $http_upgrade; | ||
proxy_set_header Connection "upgrade"; | ||
proxy_set_header X-Forwarded-Ssl on; | ||
} | ||
|
||
location / { | ||
# nginx ACL | ||
# allow <ACCESS_PREFIX_1>; | ||
# ... | ||
# allow <ACCESS_PREFIX_N>; | ||
# deny all; | ||
proxy_pass http://frontend:8000/; | ||
proxy_redirect off; | ||
proxy_set_header Host $host:$server_port; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Ssl on; | ||
} | ||
ssl_certificate /etc/nginx/certs/cert.pem; | ||
ssl_certificate_key /etc/nginx/certs/key.pem; | ||
|
||
# let's encrypt configuration | ||
# ssl_certificate /etc/letsencrypt/live/<domain_name>/fullchain.pem; | ||
# ssl_certificate_key /etc/letsencrypt/live/<domain_name>/privkey.pem; | ||
# include /etc/letsencrypt/options-ssl-nginx.conf; | ||
# ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; | ||
gzip on; | ||
gzip_proxied any; | ||
gzip_types | ||
text/css | ||
text/javascript | ||
text/xml | ||
text/plain | ||
application/javascript | ||
application/x-javascript | ||
application/json; | ||
} | ||
|
||
} |
Oops, something went wrong.