-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix requirements; Add dev documentation (#87)
- Loading branch information
Showing
7 changed files
with
212 additions
and
22 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 |
---|---|---|
@@ -1,35 +1,54 @@ | ||
.PHONY: start stop build pull shell down remove logs user sysadmin secret cron | ||
.PHONY: start stop build pull shell down remove remove-images logs logs-less exec user sysadmin secret cron clean-rebuild | ||
|
||
COMPOSE_FILES = -f docker-compose.yaml -f .docker-compose-db.yaml -f .docker-compose.$O-theme.yaml | ||
|
||
start: | ||
docker-compose -f docker-compose.yaml -f .docker-compose-db.yaml -f .docker-compose.$O-theme.yaml up -d --build nginx && make cron | ||
docker-compose $(COMPOSE_FILES) up -d --build nginx && make cron | ||
|
||
stop: | ||
docker-compose -f docker-compose.yaml -f .docker-compose-db.yaml -f .docker-compose.$O-theme.yaml stop | ||
docker-compose $(COMPOSE_FILES) stop | ||
|
||
build: | ||
docker-compose -f docker-compose.yaml -f .docker-compose-db.yaml -f .docker-compose.$O-theme.yaml build | ||
docker-compose $(COMPOSE_FILES) build | ||
|
||
pull: | ||
docker-compose -f docker-compose.yaml -f .docker-compose-db.yaml -f .docker-compose.$O-theme.yaml pull | ||
docker-compose $(COMPOSE_FILES) pull | ||
|
||
shell: | ||
docker-compose -f docker-compose.yaml -f .docker-compose-db.yaml -f .docker-compose.$O-theme.yaml exec $S $C | ||
docker-compose $(COMPOSE_FILES) exec $S $C | ||
|
||
down: | ||
docker-compose -f docker-compose.yaml -f .docker-compose-db.yaml -f .docker-compose.$O-theme.yaml down | ||
docker-compose $(COMPOSE_FILES) down | ||
|
||
remove: | ||
docker-compose -f docker-compose.yaml -f .docker-compose-db.yaml -f .docker-compose.$O-theme.yaml down -v | ||
docker-compose $(COMPOSE_FILES) down -v | ||
|
||
remove-images: | ||
docker images -a | grep "ckan-cloud-docker" | awk '{print $$3}' | xargs docker rmi -f | ||
|
||
logs: | ||
docker-compose -f docker-compose.yaml -f .docker-compose-db.yaml -f .docker-compose.$O-theme.yaml logs -f $S | ||
docker-compose $(COMPOSE_FILES) logs -f $S | ||
|
||
logs-less: | ||
docker-compose $(COMPOSE_FILES) logs $S | less | ||
|
||
exec: | ||
docker-compose $(COMPOSE_FILES) exec $S $C | ||
|
||
user: | ||
docker-compose -f docker-compose.yaml -f .docker-compose-db.yaml -f .docker-compose.$O-theme.yaml \ | ||
exec ckan /usr/local/bin/ckan-paster --plugin=ckan user add $U password=$P email=$E -c /etc/ckan/production.ini | ||
docker-compose $(COMPOSE_FILES) exec ckan /usr/local/bin/ckan-paster --plugin=ckan user add $U password=$P email=$E -c /etc/ckan/production.ini | ||
|
||
sysadmin: | ||
docker-compose -f docker-compose.yaml -f .docker-compose-db.yaml -f .docker-compose.$O-theme.yaml \ | ||
exec ckan /usr/local/bin/ckan-paster --plugin=ckan sysadmin add $U -c /etc/ckan/production.ini | ||
docker-compose $(COMPOSE_FILES) exec ckan /usr/local/bin/ckan-paster --plugin=ckan sysadmin add $U -c /etc/ckan/production.ini | ||
|
||
secret: | ||
python create_secrets.py | ||
|
||
cron: | ||
docker-compose -f docker-compose.yaml -f .docker-compose-db.yaml -f .docker-compose.$O-theme.yaml exec --user=root ckan service cron start | ||
docker-compose $(COMPOSE_FILES) exec --user=root ckan service cron start | ||
|
||
clean-rebuild: | ||
docker-compose $(COMPOSE_FILES) down -v | ||
docker images -a | grep "ckan-cloud-docker" | awk '{print $$3}' | xargs docker rmi -f | ||
docker-compose $(COMPOSE_FILES) build --no-cache | ||
docker-compose $(COMPOSE_FILES) up -d --build nginx && make cron |
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,32 @@ | ||
debug = false | ||
defaultEntryPoints = ["http"] | ||
|
||
[entryPoints] | ||
[entryPoints.http] | ||
address = ":80" | ||
|
||
[entryPoints.api] | ||
address = ":8081" | ||
|
||
[api] | ||
entryPoint = "api" | ||
|
||
[ping] | ||
entryPoint = "http" | ||
|
||
[accessLog] | ||
|
||
[file] | ||
watch = true | ||
|
||
[backends] | ||
[backends.ckan] | ||
[backends.ckan.servers.server1] | ||
url = "http://nginx:8080" | ||
|
||
[frontends] | ||
[frontends.ckan] | ||
backend="ckan" | ||
passHostHeader = true | ||
[frontends.ckan.routes.route1] | ||
rule = "Host:localhost" |