This repository has been archived by the owner on Oct 10, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #60 from automationator/master
Minor updates
- Loading branch information
Showing
17 changed files
with
130 additions
and
17 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,25 @@ | ||
#!/bin/bash | ||
|
||
# Error if the campaigns.json path does not exist | ||
if [[ ! -f "$1" ]] | ||
then | ||
echo "Could not find CRITS campaigns JSON: $1" | ||
exit 1 | ||
fi | ||
|
||
# Create the import directory if it does not exist | ||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | ||
import_dir="$DIR/../services/web/import" | ||
if [[ ! -d "$import_dir" ]] | ||
then | ||
mkdir "$import_dir" | ||
fi | ||
|
||
# Copy the campaigns.json file into the import directory | ||
cp "$1" "$import_dir/campaigns.json" | ||
|
||
docker-compose -f docker-compose-PROD.yml build | ||
docker-compose -f docker-compose-PROD.yml run web-prod pypy3 manage.py import-crits-campaigns | ||
|
||
# Delete the campaigns.json file from the container. | ||
rm "$import_dir/campaigns.json" |
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,25 @@ | ||
#!/bin/bash | ||
|
||
# Error if the indicators.json path does not exist | ||
if [[ ! -f "$1" ]] | ||
then | ||
echo "Could not find CRITS indicators JSON: $1" | ||
exit 1 | ||
fi | ||
|
||
# Create the import directory if it does not exist | ||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | ||
import_dir="$DIR/../services/web/import" | ||
if [[ ! -d "$import_dir" ]] | ||
then | ||
mkdir "$import_dir" | ||
fi | ||
|
||
# Copy the indicators.json file into the import directory | ||
cp "$1" "$import_dir/indicators.json" | ||
|
||
docker-compose -f docker-compose-PROD.yml build | ||
docker-compose -f docker-compose-PROD.yml run web-prod pypy3 manage.py import-crits-indicators | ||
|
||
# Delete the indicators.json file from the container. | ||
rm "$import_dir/indicators.json" |
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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
#FROM mysql:5.7 | ||
FROM mysql:8.0.15 | ||
|
||
ARG http_proxy | ||
ARG https_proxy | ||
|
||
ADD create.sql /docker-entrypoint-initdb.d | ||
ADD conf.d/ /etc/mysql/conf.d |
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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
#FROM mysql:5.7 | ||
FROM mysql:8.0 | ||
FROM mysql:8.0.15 | ||
|
||
ARG http_proxy | ||
ARG https_proxy | ||
|
||
ADD create.sql /docker-entrypoint-initdb.d | ||
ADD conf.d/ /etc/mysql/conf.d |
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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
#FROM mysql:5.7 | ||
FROM mysql:8.0 | ||
FROM mysql:8.0.15 | ||
|
||
ARG http_proxy | ||
ARG https_proxy | ||
|
||
ADD create.sql /docker-entrypoint-initdb.d | ||
ADD conf.d/ /etc/mysql/conf.d |
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 |
---|---|---|
@@ -1,5 +1,8 @@ | ||
FROM nginx:1.15.6-alpine | ||
|
||
ARG http_proxy | ||
ARG https_proxy | ||
|
||
RUN rm /etc/nginx/conf.d/default.conf | ||
COPY ./server-DEV.conf /etc/nginx/conf.d | ||
ADD certs/ /etc/nginx/certs |
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 |
---|---|---|
@@ -1,5 +1,8 @@ | ||
FROM nginx:1.15.6-alpine | ||
|
||
ARG http_proxy | ||
ARG https_proxy | ||
|
||
RUN rm /etc/nginx/conf.d/default.conf | ||
COPY ./server-PROD.conf /etc/nginx/conf.d | ||
ADD certs/ /etc/nginx/certs |
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 |
---|---|---|
@@ -1,5 +1,8 @@ | ||
FROM nginx:1.15.6-alpine | ||
|
||
ARG http_proxy | ||
ARG https_proxy | ||
|
||
RUN rm /etc/nginx/conf.d/default.conf | ||
COPY ./server-TEST.conf /etc/nginx/conf.d | ||
ADD certs/ /etc/nginx/certs |
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