From 310f1a38279d2d0d1352ea51dfb81a405367a218 Mon Sep 17 00:00:00 2001 From: Mingxun Wang Date: Tue, 23 Jul 2019 11:16:04 -0700 Subject: [PATCH] adding production with networking --- code/Makefile | 10 ++++++++++ code/docker-compose-production.yml | 19 +++++++++++++++++++ code/docker-compose.yml | 3 --- 3 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 code/docker-compose-production.yml diff --git a/code/Makefile b/code/Makefile index c2c575c..e07925c 100644 --- a/code/Makefile +++ b/code/Makefile @@ -30,3 +30,13 @@ bash: attach: docker exec -i -t gnpsmetadata /bin/bash + + +#Docker Compose +server-compose-interactive: + docker-compose build + docker-compose up + +server-compose-production: + docker-compose build + docker-compose -f docker-compose.yml -f docker-compose-production.yml up -d \ No newline at end of file diff --git a/code/docker-compose-production.yml b/code/docker-compose-production.yml new file mode 100644 index 0000000..9647878 --- /dev/null +++ b/code/docker-compose-production.yml @@ -0,0 +1,19 @@ +version: '3' + +services: + redu-ms2-web: + networks: + - default + - nginx-net + environment: + VIRTUAL_HOST: redu.ucsd.edu + #VIRTUAL_HOST: mingwangbeta.ucsd.edu + VIRTUAL_PORT: 5005 + LETSENCRYPT_HOST: redu.ucsd.edu + #LETSENCRYPT_HOST: mingwangbeta.ucsd.edu + LETSENCRYPT_EMAIL: miw023@ucsd.edu + +networks: + nginx-net: + external: + name: nginx-net \ No newline at end of file diff --git a/code/docker-compose.yml b/code/docker-compose.yml index 4566576..e625386 100644 --- a/code/docker-compose.yml +++ b/code/docker-compose.yml @@ -9,9 +9,6 @@ services: - ../database/:/app/database - ../temp/:/app/temp command: /app/run_production_server.sh - environment: - - VIRTUAL_HOST=redu.ucsd.edu - - VIRTUAL_PORT=5005 redu-ms2-populate: build: .