From 6b20414ef96c4a7736cd5c82e0433d0c80d67551 Mon Sep 17 00:00:00 2001 From: Avik Datta Date: Mon, 22 May 2023 14:42:42 +0100 Subject: [PATCH] aupdated docker files --- docker-compose-igf-lims_v2.yaml | 134 +++++++++++++++++++++++++++++ docker-compose-igf-lims_v2_db.yaml | 32 +++++++ docker-compose-igfportal.yaml | 16 ++-- docker-compose-igfportal_db.yaml | 32 +++++++ docker_start_igf_lims_v2.sh | 2 + docker_start_igfportal_v2.sh | 2 + 6 files changed, 210 insertions(+), 8 deletions(-) create mode 100644 docker-compose-igf-lims_v2.yaml create mode 100644 docker-compose-igf-lims_v2_db.yaml create mode 100644 docker-compose-igfportal_db.yaml create mode 100644 docker_start_igf_lims_v2.sh create mode 100644 docker_start_igfportal_v2.sh diff --git a/docker-compose-igf-lims_v2.yaml b/docker-compose-igf-lims_v2.yaml new file mode 100644 index 0000000..f501a53 --- /dev/null +++ b/docker-compose-igf-lims_v2.yaml @@ -0,0 +1,134 @@ +version: '3.9' +networks: + portal_network: + driver: bridge +services: + portal_db: + image: mysql:5.7 + env_file: env + restart: unless-stopped + ports: + - "3308:3306" + logging: + driver: "json-file" + options: + max-size: "2048m" + volumes: + - /home/igf/igf_portal/portal_v2/mysqlappdb:/var/lib/mysql:rw + container_name: portal_db + networks: + - portal_network + redis_db: + image: redis:6.2 + restart: unless-stopped + container_name: redis_db + logging: + driver: "json-file" + options: + max-size: "2048m" + networks: + - portal_network + webserver: + image: imperialgenomicsfacility/igfportal:v0.0.2.1 + env_file: env + logging: + driver: "json-file" + options: + max-size: "2048m" + restart: unless-stopped + links: + - portal_db + - redis_db + depends_on: + - portal_db + - redis_db + volumes: + - /home/igf/igf_portal/portal_v2/IGFPortal:/github/IGFPortal:ro + - /home/igf/igf_portal/ssl_cert:/SSL:ro + - /home/igf/igf_portal/portal_v2/static:/data/static:rw + - /home/igf/igf_portal/secret/airflow_conf.json:/secret/airflow_conf.json:ro + - /tmp:/TMP_WORK_DIR:rw + container_name: webserver + command: ["gunicorn -b 0.0.0.0:8080 --threads 4 server:app"] + networks: + - portal_network + nginx: + image: nginx:1.23.3 + logging: + driver: "json-file" + options: + max-size: "2048m" + ports: + - "80:80" + - "443:443" + links: + - webserver + depends_on: + - webserver + volumes: + - /home/igf/igf_portal/ssl_cert:/SSL:ro + - /home/igf/igf_portal/portal_v2/nginx/nginx.conf:/etc/nginx/nginx.conf:ro + - /home/igf/igf_portal/portal_v2/nginx:/var/nginx/:rw + - /home/igf/igf_portal/portal_v2/static:/data/static:rw + container_name: nginx + restart: unless-stopped + networks: + - portal_network + celery_worker1: + image: imperialgenomicsfacility/igfportal:v0.0.2.1 + env_file: env + logging: + driver: "json-file" + options: + max-size: "2048m" + links: + - portal_db + - redis_db + depends_on: + - portal_db + - redis_db + restart: unless-stopped + volumes: + - /home/igf/igf_portal/portal_v2/IGFPortal:/github/IGFPortal:ro + - /home/igf/igf_portal/secret/airflow_conf.json:/secret/airflow_conf.json:ro + - /tmp:/TMP_WORK_DIR:rw + container_name: celery_worker1 + command: ["celery -A app.celery worker --loglevel=WARNING"] + networks: + - portal_network + celery_flower: + image: imperialgenomicsfacility/igfportal:v0.0.2.1 + env_file: env + restart: unless-stopped + logging: + driver: "json-file" + options: + max-size: "2048m" + ports: + - "5556:5555" + links: + - redis_db + - portal_db + depends_on: + - redis_db + - portal_db + volumes: + - /home/igf/igf_portal/portal_v2/IGFPortal:/github/IGFPortal:ro + container_name: celery_flower + command: ["celery -A app.celery flower --basic_auth=$${BASIC_AUTH}"] + networks: + - portal_network + adminer: + image: adminer:latest + logging: + driver: "json-file" + options: + max-size: "2048m" + links: + - portal_db + ports: + - "8081:8080" + restart: unless-stopped + container_name: adminer + networks: + - portal_network \ No newline at end of file diff --git a/docker-compose-igf-lims_v2_db.yaml b/docker-compose-igf-lims_v2_db.yaml new file mode 100644 index 0000000..2070566 --- /dev/null +++ b/docker-compose-igf-lims_v2_db.yaml @@ -0,0 +1,32 @@ +version: '3.9' +networks: + portal_network: + driver: bridge +services: + portal_db: + image: mysql:5.7 + env_file: env + restart: unless-stopped + logging: + driver: "json-file" + options: + max-size: "2048m" + volumes: + - /home/igf/igf_portal/portal_v2/mysqlappdb:/var/lib/mysql:rw + container_name: portal_db + networks: + - portal_network + adminer: + image: adminer:latest + logging: + driver: "json-file" + options: + max-size: "2048m" + links: + - portal_db + ports: + - "8081:8080" + restart: unless-stopped + container_name: adminer + networks: + - portal_network \ No newline at end of file diff --git a/docker-compose-igfportal.yaml b/docker-compose-igfportal.yaml index efa3837..0fff401 100644 --- a/docker-compose-igfportal.yaml +++ b/docker-compose-igfportal.yaml @@ -6,19 +6,19 @@ services: portal_db: image: mysql:5.7 env_file: env - restart: always + restart: unless-stopped logging: driver: "json-file" options: max-size: "2048m" volumes: - - /home/igf/dev/mysqlappdb:/var/lib/mysql:rw + - /home/igf/dev/mysqlappdb_v2:/var/lib/mysql:rw container_name: portal_db networks: - portal_network redis_db: image: redis:6.2 - restart: always + restart: unless-stopped container_name: redis_db logging: driver: "json-file" @@ -37,7 +37,7 @@ services: max-size: "2048m" ports: - 8080:8080 - restart: always + restart: unless-stopped links: - portal_db - redis_db @@ -73,7 +73,7 @@ services: - /home/igf/dev/nginx:/var/nginx/:rw - /home/igf/dev/static:/data/static:rw container_name: nginx - restart: always + restart: unless-stopped networks: - portal_network celery_worker1: @@ -89,7 +89,7 @@ services: depends_on: - portal_db - redis_db - restart: always + restart: unless-stopped volumes: - /home/igf/dev/IGFPortal:/github/IGFPortal:ro - /home/igf/dev/secret/airflow_conf.json:/secret/airflow_conf.json:ro @@ -101,7 +101,7 @@ services: celery_flower: image: imperialgenomicsfacility/igfportal:v0.0.2.1 env_file: env - restart: always + restart: unless-stopped logging: driver: "json-file" options: @@ -130,7 +130,7 @@ services: - portal_db ports: - "8081:8080" - restart: always + restart: unless-stopped container_name: adminer networks: - portal_network diff --git a/docker-compose-igfportal_db.yaml b/docker-compose-igfportal_db.yaml new file mode 100644 index 0000000..6b0f288 --- /dev/null +++ b/docker-compose-igfportal_db.yaml @@ -0,0 +1,32 @@ +version: '3.9' +networks: + portal_network: + driver: bridge +services: + portal_db: + image: mysql:5.7 + env_file: env + restart: unless-stopped + logging: + driver: "json-file" + options: + max-size: "2048m" + volumes: + - /home/igf/dev/mysqlappdb_v2:/var/lib/mysql:rw + container_name: portal_db + networks: + - portal_network + adminer: + image: adminer:latest + logging: + driver: "json-file" + options: + max-size: "2048m" + links: + - portal_db + ports: + - "8081:8080" + restart: unless-stopped + container_name: adminer + networks: + - portal_network \ No newline at end of file diff --git a/docker_start_igf_lims_v2.sh b/docker_start_igf_lims_v2.sh new file mode 100644 index 0000000..1db13b5 --- /dev/null +++ b/docker_start_igf_lims_v2.sh @@ -0,0 +1,2 @@ +#docker-compose -f docker-compose-igfportal_v2.yaml -p igfportal_v2 up -d +docker-compose -f docker-compose-igfportal_v2_db.yaml -p igfportal_v2 up -d \ No newline at end of file diff --git a/docker_start_igfportal_v2.sh b/docker_start_igfportal_v2.sh new file mode 100644 index 0000000..eb7b004 --- /dev/null +++ b/docker_start_igfportal_v2.sh @@ -0,0 +1,2 @@ +#docker compose -f docker-compose-igfportal_db.yaml -p igfportal up -d +docker compose -f docker-compose-igfportal.yaml -p igfportal up -d \ No newline at end of file