lol
This commit is contained in:
parent
4f390ce36a
commit
743e874c59
|
@ -1,3 +1,2 @@
|
||||||
APP=myos
|
APP=myos
|
||||||
DOCKER_SERVICE=cli
|
DOCKER_SERVICE=cli
|
||||||
ENV=dist
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme
|
; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme
|
||||||
;
|
;
|
||||||
[subrepo]
|
[subrepo]
|
||||||
remote = ssh://git@github.com/1001Pharmacies/ansible-aws-cli
|
remote = ssh://git@github.com/aynicos/ansible-aws-cli
|
||||||
branch = master
|
branch = master
|
||||||
commit = f10e38af3a9b36648576f9850e0d09fcc7a057df
|
commit = f10e38af3a9b36648576f9850e0d09fcc7a057df
|
||||||
parent = 9ee8bfab9d2f5e5591c2e8a3d6f3a03b56b36196
|
parent = 9ee8bfab9d2f5e5591c2e8a3d6f3a03b56b36196
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme
|
; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme
|
||||||
;
|
;
|
||||||
[subrepo]
|
[subrepo]
|
||||||
remote = ssh://git@github.com/1001Pharmacies/ansible-disks
|
remote = ssh://git@github.com/aynicos/ansible-disks
|
||||||
branch = master
|
branch = master
|
||||||
commit = c0ac6978d715b461fbf20aca719cd5196bc60645
|
commit = c0ac6978d715b461fbf20aca719cd5196bc60645
|
||||||
parent = d01cccd9bab3a63d60ba251e3719767635ccd5d2
|
parent = d01cccd9bab3a63d60ba251e3719767635ccd5d2
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme
|
; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme
|
||||||
;
|
;
|
||||||
[subrepo]
|
[subrepo]
|
||||||
remote = ssh://git@github.com/1001Pharmacies/ansible-docker
|
remote = ssh://git@github.com/aynicos/ansible-docker
|
||||||
branch = master
|
branch = master
|
||||||
commit = 6217a899084cba00447195d1873b211462b60d52
|
commit = 6217a899084cba00447195d1873b211462b60d52
|
||||||
parent = 4745dad8cb8a826ee3ac47accda79f96957b5e13
|
parent = 4745dad8cb8a826ee3ac47accda79f96957b5e13
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme
|
; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme
|
||||||
;
|
;
|
||||||
[subrepo]
|
[subrepo]
|
||||||
remote = ssh://git@github.com/1001Pharmacies/ansible-hosts
|
remote = ssh://git@github.com/aynicos/ansible-hosts
|
||||||
branch = master
|
branch = master
|
||||||
commit = a495a6dbfae1f3c32f8e968c1ff2b3596ab42f27
|
commit = a495a6dbfae1f3c32f8e968c1ff2b3596ab42f27
|
||||||
parent = 85a259e1f4db43a63c58b4c8fe39b5d5e3b54053
|
parent = 85a259e1f4db43a63c58b4c8fe39b5d5e3b54053
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
USER := 1001pharmacies
|
USER := aynicos
|
||||||
APP ?= $(shell hostname -s)
|
APP ?= $(shell hostname -s)
|
||||||
CMDS := exec
|
CMDS := exec
|
||||||
SERVICE ?= php
|
SERVICE ?= php
|
||||||
|
|
60
aws/aws.mk
60
aws/aws.mk
|
@ -20,25 +20,25 @@ aws-docker-login: aws-ecr-get-login
|
||||||
# target aws-ecr-get-login: Exec 'Call aws ecr get-login'
|
# target aws-ecr-get-login: Exec 'Call aws ecr get-login'
|
||||||
.PHONY: aws-ecr-get-login
|
.PHONY: aws-ecr-get-login
|
||||||
aws-ecr-get-login:
|
aws-ecr-get-login:
|
||||||
$(eval DRYRUN_IGNORE := true)
|
$(eval IGNORE_DRYRUN := true)
|
||||||
$(eval docker_login := $(shell $(call aws,ecr get-login --no-include-email --region $(AWS_DEFAULT_REGION))))
|
$(eval docker_login := $(shell $(call aws,ecr get-login --no-include-email --region $(AWS_DEFAULT_REGION))))
|
||||||
$(eval DRYRUN_IGNORE := FALSE)
|
$(eval IGNORE_DRYRUN := FALSE)
|
||||||
$(RUN) $(docker_login)
|
$(RUN) $(docker_login)
|
||||||
|
|
||||||
# target aws-iam-create-role-%: Call aws iam create-role with role-name % and role-policy file aws/policies/%-trust.json
|
# target aws-iam-create-role-%: Call aws iam create-role with role-name % and role-policy file aws/policies/%-trust.json
|
||||||
.PHONY: aws-iam-create-role-%
|
.PHONY: aws-iam-create-role-%
|
||||||
aws-iam-create-role-%: base docker-build-aws
|
aws-iam-create-role-%: base docker-build-aws
|
||||||
$(eval DRYRUN_IGNORE := true)
|
$(eval IGNORE_DRYRUN := true)
|
||||||
$(eval json := $(shell $(call exec,envsubst < aws/policies/$*-trust.json)))
|
$(eval json := $(shell $(call exec,envsubst < aws/policies/$*-trust.json)))
|
||||||
$(eval DRYRUN_IGNORE := false)
|
$(eval IGNORE_DRYRUN := false)
|
||||||
$(call aws,iam create-role --role-name $* --assume-role-policy-document '$(json)')
|
$(call aws,iam create-role --role-name $* --assume-role-policy-document '$(json)')
|
||||||
|
|
||||||
# target aws-iam-put-role-policy-%: Call aws iam put-role-policy with policy-name % and policy-document file aws/policies/%.json
|
# target aws-iam-put-role-policy-%: Call aws iam put-role-policy with policy-name % and policy-document file aws/policies/%.json
|
||||||
.PHONY: aws-iam-put-role-policy-%
|
.PHONY: aws-iam-put-role-policy-%
|
||||||
aws-iam-put-role-policy-%: base docker-build-aws
|
aws-iam-put-role-policy-%: base docker-build-aws
|
||||||
$(eval DRYRUN_IGNORE := true)
|
$(eval IGNORE_DRYRUN := true)
|
||||||
$(eval json := $(shell $(call exec,envsubst < aws/policies/$*.json)))
|
$(eval json := $(shell $(call exec,envsubst < aws/policies/$*.json)))
|
||||||
$(eval DRYRUN_IGNORE := false)
|
$(eval IGNORE_DRYRUN := false)
|
||||||
$(call aws,iam put-role-policy --role-name $* --policy-name $* --policy-document '$(json)')
|
$(call aws,iam put-role-policy --role-name $* --policy-name $* --policy-document '$(json)')
|
||||||
|
|
||||||
# target aws-role-create-import-image: Fire aws-iam-create-role-% aws-iam-put-role-policy-% for AWS_VM_IMPORT_ROLE_NAME
|
# target aws-role-create-import-image: Fire aws-iam-create-role-% aws-iam-put-role-policy-% for AWS_VM_IMPORT_ROLE_NAME
|
||||||
|
@ -49,9 +49,9 @@ aws-role-create-import-image: aws-iam-create-role-$(AWS_VM_IMPORT_ROLE_NAME) aw
|
||||||
.PHONY: aws-s3-check-upload
|
.PHONY: aws-s3-check-upload
|
||||||
aws-s3-check-upload: docker-build-aws aws-s3api-get-head-object-etag
|
aws-s3-check-upload: docker-build-aws aws-s3api-get-head-object-etag
|
||||||
$(eval upload := true)
|
$(eval upload := true)
|
||||||
$(eval DRYRUN_IGNORE := true)
|
$(eval IGNORE_DRYRUN := true)
|
||||||
$(if $(AWS_S3_KEY_ETAG),$(if $(filter $(AWS_S3_KEY_ETAG),"$(shell cat $(PACKER_ISO_INFO) |awk '$$1 == "etag:" {print $$2}' 2>/dev/null)"),$(eval upload := false)))
|
$(if $(AWS_S3_KEY_ETAG),$(if $(filter $(AWS_S3_KEY_ETAG),"$(shell cat $(PACKER_ISO_INFO) |awk '$$1 == "etag:" {print $$2}' 2>/dev/null)"),$(eval upload := false)))
|
||||||
$(eval DRYRUN_IGNORE := false)
|
$(eval IGNORE_DRYRUN := false)
|
||||||
|
|
||||||
# target aws-s3-cp: Fire aws-s3-check-upload, Call aws s3 cp PACKER_ISO_FILE s3://AWS_S3_BUCKET/AWS_S3_KEY, Call aws-s3-etag-save target
|
# target aws-s3-cp: Fire aws-s3-check-upload, Call aws s3 cp PACKER_ISO_FILE s3://AWS_S3_BUCKET/AWS_S3_KEY, Call aws-s3-etag-save target
|
||||||
.PHONY: aws-s3-cp
|
.PHONY: aws-s3-cp
|
||||||
|
@ -66,25 +66,25 @@ aws-s3-etag-save: docker-build-aws aws-s3api-get-head-object-etag
|
||||||
# target aws-s3api-get-head-object-etag: Eval AWS_S3_KEY_ETAG, Echo 'ETag: AWS_S3_KEY_ETAG'
|
# target aws-s3api-get-head-object-etag: Eval AWS_S3_KEY_ETAG, Echo 'ETag: AWS_S3_KEY_ETAG'
|
||||||
.PHONY: aws-s3api-get-head-object-etag
|
.PHONY: aws-s3api-get-head-object-etag
|
||||||
aws-s3api-get-head-object-etag: docker-build-aws
|
aws-s3api-get-head-object-etag: docker-build-aws
|
||||||
$(eval DRYRUN_IGNORE := true)
|
$(eval IGNORE_DRYRUN := true)
|
||||||
$(eval AWS_S3_KEY_ETAG := $(shell $(call aws,s3api head-object --bucket $(AWS_S3_BUCKET) --key $(AWS_S3_KEY) --output text --query ETag) |grep -v 'operation: Not Found' 2>/dev/null))
|
$(eval AWS_S3_KEY_ETAG := $(shell $(call aws,s3api head-object --bucket $(AWS_S3_BUCKET) --key $(AWS_S3_KEY) --output text --query ETag) |grep -v 'operation: Not Found' 2>/dev/null))
|
||||||
$(eval DRYRUN_IGNORE := false)
|
$(eval IGNORE_DRYRUN := false)
|
||||||
echo ETag: $(AWS_S3_KEY_ETAG)
|
echo ETag: $(AWS_S3_KEY_ETAG)
|
||||||
|
|
||||||
# target aws-s3api-get-head-object-lastmodified: Eval AWS_S3_KEY_DATE, Echo 'LastModified: AWS_S3_KEY_DATE'
|
# target aws-s3api-get-head-object-lastmodified: Eval AWS_S3_KEY_DATE, Echo 'LastModified: AWS_S3_KEY_DATE'
|
||||||
.PHONY: aws-s3api-get-head-object-lastmodified
|
.PHONY: aws-s3api-get-head-object-lastmodified
|
||||||
aws-s3api-get-head-object-lastmodified: docker-build-aws
|
aws-s3api-get-head-object-lastmodified: docker-build-aws
|
||||||
$(eval DRYRUN_IGNORE := true)
|
$(eval IGNORE_DRYRUN := true)
|
||||||
$(eval AWS_S3_KEY_DATE := $(shell $(call aws,s3api head-object --bucket $(AWS_S3_BUCKET) --key $(AWS_S3_KEY) --output text --query LastModified) |grep -v 'operation: Not Found' 2>/dev/null))
|
$(eval AWS_S3_KEY_DATE := $(shell $(call aws,s3api head-object --bucket $(AWS_S3_BUCKET) --key $(AWS_S3_KEY) --output text --query LastModified) |grep -v 'operation: Not Found' 2>/dev/null))
|
||||||
$(eval DRYRUN_IGNORE := false)
|
$(eval IGNORE_DRYRUN := false)
|
||||||
echo LastModified: $(AWS_S3_KEY_DATE)
|
echo LastModified: $(AWS_S3_KEY_DATE)
|
||||||
|
|
||||||
# target aws-ec2-import-snapshot: Call aws ec2 import-snapshot with S3Bucket AWS_S3_BUCKET and S3Key AWS_S3_KEY
|
# target aws-ec2-import-snapshot: Call aws ec2 import-snapshot with S3Bucket AWS_S3_BUCKET and S3Key AWS_S3_KEY
|
||||||
.PHONY: aws-ec2-import-snapshot
|
.PHONY: aws-ec2-import-snapshot
|
||||||
aws-ec2-import-snapshot: base docker-build-aws aws-s3api-get-head-object-etag aws-s3api-get-head-object-lastmodified
|
aws-ec2-import-snapshot: base docker-build-aws aws-s3api-get-head-object-etag aws-s3api-get-head-object-lastmodified
|
||||||
$(eval DRYRUN_IGNORE := true)
|
$(eval IGNORE_DRYRUN := true)
|
||||||
$(eval json := $(shell $(call exec,envsubst < aws/import-snapshot.json)))
|
$(eval json := $(shell $(call exec,envsubst < aws/import-snapshot.json)))
|
||||||
$(eval DRYRUN_IGNORE := false)
|
$(eval IGNORE_DRYRUN := false)
|
||||||
$(eval AWS_TASK_ID := $(shell $(call aws,ec2 import-snapshot --description '$(AWS_SNAP_DESCRIPTION)' --output text --query ImportTaskId --disk-container '$(json)')))
|
$(eval AWS_TASK_ID := $(shell $(call aws,ec2 import-snapshot --description '$(AWS_SNAP_DESCRIPTION)' --output text --query ImportTaskId --disk-container '$(json)')))
|
||||||
echo ImportTaskId: $(AWS_TASK_ID)
|
echo ImportTaskId: $(AWS_TASK_ID)
|
||||||
|
|
||||||
|
@ -111,17 +111,17 @@ aws-ec2-describe-instances-PrivateIpAddress-%: docker-build-aws
|
||||||
# target aws-ec2-get-instances-PrivateIpAddress: Eval AWS_INSTANCE_IP, Echo 'PrivateIpAddress: AWS_INSTANCE_IP'
|
# target aws-ec2-get-instances-PrivateIpAddress: Eval AWS_INSTANCE_IP, Echo 'PrivateIpAddress: AWS_INSTANCE_IP'
|
||||||
.PHONY: aws-ec2-get-instances-PrivateIpAddress
|
.PHONY: aws-ec2-get-instances-PrivateIpAddress
|
||||||
aws-ec2-get-instances-PrivateIpAddress: docker-build-aws
|
aws-ec2-get-instances-PrivateIpAddress: docker-build-aws
|
||||||
$(eval DRYRUN_IGNORE := true)
|
$(eval IGNORE_DRYRUN := true)
|
||||||
$(eval AWS_INSTANCE_IP := $(shell $(call aws,ec2 describe-instances --no-paginate --query 'Reservations[*].Instances[*].PrivateIpAddress' --output text) 2>/dev/null))
|
$(eval AWS_INSTANCE_IP := $(shell $(call aws,ec2 describe-instances --no-paginate --query 'Reservations[*].Instances[*].PrivateIpAddress' --output text) 2>/dev/null))
|
||||||
$(eval DRYRUN_IGNORE := false)
|
$(eval IGNORE_DRYRUN := false)
|
||||||
echo PrivateIpAddress: $(AWS_INSTANCE_IP)
|
echo PrivateIpAddress: $(AWS_INSTANCE_IP)
|
||||||
|
|
||||||
# target aws-ec2-get-instances-PrivateIpAddress-%: Eval AWS_INSTANCE_IP with Name matching %, Echo 'PrivateIpAddress: AWS_INSTANCE_IP'
|
# target aws-ec2-get-instances-PrivateIpAddress-%: Eval AWS_INSTANCE_IP with Name matching %, Echo 'PrivateIpAddress: AWS_INSTANCE_IP'
|
||||||
.PHONY: aws-ec2-get-instances-PrivateIpAddress-%
|
.PHONY: aws-ec2-get-instances-PrivateIpAddress-%
|
||||||
aws-ec2-get-instances-PrivateIpAddress-%:
|
aws-ec2-get-instances-PrivateIpAddress-%:
|
||||||
$(eval DRYRUN_IGNORE := true)
|
$(eval IGNORE_DRYRUN := true)
|
||||||
$(eval AWS_INSTANCE_IP := $(shell $(call aws,ec2 describe-instances --no-paginate --filter 'Name=tag:Name$(comma)Values=$**' --query 'Reservations[*].Instances[*].PrivateIpAddress' --output text) 2>/dev/null))
|
$(eval AWS_INSTANCE_IP := $(shell $(call aws,ec2 describe-instances --no-paginate --filter 'Name=tag:Name$(comma)Values=$**' --query 'Reservations[*].Instances[*].PrivateIpAddress' --output text) 2>/dev/null))
|
||||||
$(eval DRYRUN_IGNORE := false)
|
$(eval IGNORE_DRYRUN := false)
|
||||||
echo PrivateIpAddress: $(AWS_INSTANCE_IP)
|
echo PrivateIpAddress: $(AWS_INSTANCE_IP)
|
||||||
|
|
||||||
# target aws-ec2-get-import-snapshot-tasks-id: Fire aws-ec2-get-import-snapshot-tasks-id-% for AWS_TASK_ID
|
# target aws-ec2-get-import-snapshot-tasks-id: Fire aws-ec2-get-import-snapshot-tasks-id-% for AWS_TASK_ID
|
||||||
|
@ -131,41 +131,41 @@ aws-ec2-get-import-snapshot-tasks-id: aws-ec2-get-import-snapshot-tasks-id-$(AWS
|
||||||
# target aws-ec2-get-import-snapshot-tasks-id-%: Eval AWS_SNAP_IP with import-task-ids %, Echo 'SnapshotId: AWS_SNAP_IP'
|
# target aws-ec2-get-import-snapshot-tasks-id-%: Eval AWS_SNAP_IP with import-task-ids %, Echo 'SnapshotId: AWS_SNAP_IP'
|
||||||
.PHONY: aws-ec2-get-import-snapshot-tasks-id-%
|
.PHONY: aws-ec2-get-import-snapshot-tasks-id-%
|
||||||
aws-ec2-get-import-snapshot-tasks-id-%: docker-build-aws
|
aws-ec2-get-import-snapshot-tasks-id-%: docker-build-aws
|
||||||
$(eval DRYRUN_IGNORE := true)
|
$(eval IGNORE_DRYRUN := true)
|
||||||
$(eval AWS_SNAP_ID := $(shell $(call aws,ec2 describe-import-snapshot-tasks --import-task-ids $* --output text --query ImportSnapshotTasks[0].SnapshotTaskDetail.SnapshotId) 2>/dev/null))
|
$(eval AWS_SNAP_ID := $(shell $(call aws,ec2 describe-import-snapshot-tasks --import-task-ids $* --output text --query ImportSnapshotTasks[0].SnapshotTaskDetail.SnapshotId) 2>/dev/null))
|
||||||
$(eval DRYRUN_IGNORE := false)
|
$(eval IGNORE_DRYRUN := false)
|
||||||
echo SnapshotId: $(AWS_SNAP_ID)
|
echo SnapshotId: $(AWS_SNAP_ID)
|
||||||
|
|
||||||
# target aws-ec2-get-import-snapshot-tasks-message-%: Eval AWS_SNAP_MESSAGE with import-task-ids %, Echo 'StatusMessage: AWS_SNAP_MESSAGE'
|
# target aws-ec2-get-import-snapshot-tasks-message-%: Eval AWS_SNAP_MESSAGE with import-task-ids %, Echo 'StatusMessage: AWS_SNAP_MESSAGE'
|
||||||
.PHONY: aws-ec2-get-import-snapshot-tasks-message-%
|
.PHONY: aws-ec2-get-import-snapshot-tasks-message-%
|
||||||
aws-ec2-get-import-snapshot-tasks-message-%: docker-build-aws
|
aws-ec2-get-import-snapshot-tasks-message-%: docker-build-aws
|
||||||
$(eval DRYRUN_IGNORE := true)
|
$(eval IGNORE_DRYRUN := true)
|
||||||
$(eval AWS_SNAP_MESSAGE := $(shell $(call aws,ec2 describe-import-snapshot-tasks --import-task-ids $* --output text --query ImportSnapshotTasks[0].SnapshotTaskDetail.StatusMessage) 2>/dev/null))
|
$(eval AWS_SNAP_MESSAGE := $(shell $(call aws,ec2 describe-import-snapshot-tasks --import-task-ids $* --output text --query ImportSnapshotTasks[0].SnapshotTaskDetail.StatusMessage) 2>/dev/null))
|
||||||
$(eval DRYRUN_IGNORE := false)
|
$(eval IGNORE_DRYRUN := false)
|
||||||
echo StatusMessage: $(AWS_SNAP_MESSAGE)
|
echo StatusMessage: $(AWS_SNAP_MESSAGE)
|
||||||
|
|
||||||
# target aws-ec2-get-import-snapshot-tasks-progress-%: Eval AWS_SNAP_PROGRESS with import-task-ids %, Echo 'Progress: AWS_SNAP_PROGRESS'
|
# target aws-ec2-get-import-snapshot-tasks-progress-%: Eval AWS_SNAP_PROGRESS with import-task-ids %, Echo 'Progress: AWS_SNAP_PROGRESS'
|
||||||
.PHONY: aws-ec2-get-import-snapshot-tasks-progress-%
|
.PHONY: aws-ec2-get-import-snapshot-tasks-progress-%
|
||||||
aws-ec2-get-import-snapshot-tasks-progress-%: docker-build-aws
|
aws-ec2-get-import-snapshot-tasks-progress-%: docker-build-aws
|
||||||
$(eval DRYRUN_IGNORE := true)
|
$(eval IGNORE_DRYRUN := true)
|
||||||
$(eval AWS_SNAP_PROGRESS := $(shell $(call aws,ec2 describe-import-snapshot-tasks --import-task-ids $* --output text --query ImportSnapshotTasks[0].SnapshotTaskDetail.Progress) 2>/dev/null))
|
$(eval AWS_SNAP_PROGRESS := $(shell $(call aws,ec2 describe-import-snapshot-tasks --import-task-ids $* --output text --query ImportSnapshotTasks[0].SnapshotTaskDetail.Progress) 2>/dev/null))
|
||||||
$(eval DRYRUN_IGNORE := false)
|
$(eval IGNORE_DRYRUN := false)
|
||||||
echo Progress: $(AWS_SNAP_PROGRESS)
|
echo Progress: $(AWS_SNAP_PROGRESS)
|
||||||
|
|
||||||
# target aws-ec2-get-import-snapshot-tasks-size-%: Eval AWS_SNAP_SIZE with import-task-ids %, Echo 'DiskImageSize: AWS_SNAP_SIZE'
|
# target aws-ec2-get-import-snapshot-tasks-size-%: Eval AWS_SNAP_SIZE with import-task-ids %, Echo 'DiskImageSize: AWS_SNAP_SIZE'
|
||||||
.PHONY: aws-ec2-get-import-snapshot-tasks-size-%
|
.PHONY: aws-ec2-get-import-snapshot-tasks-size-%
|
||||||
aws-ec2-get-import-snapshot-tasks-size-%: docker-build-aws
|
aws-ec2-get-import-snapshot-tasks-size-%: docker-build-aws
|
||||||
$(eval DRYRUN_IGNORE := true)
|
$(eval IGNORE_DRYRUN := true)
|
||||||
$(eval AWS_SNAP_SIZE := $(shell $(call aws,ec2 describe-import-snapshot-tasks --import-task-ids $* --output text --query ImportSnapshotTasks[0].SnapshotTaskDetail.DiskImageSize) 2>/dev/null))
|
$(eval AWS_SNAP_SIZE := $(shell $(call aws,ec2 describe-import-snapshot-tasks --import-task-ids $* --output text --query ImportSnapshotTasks[0].SnapshotTaskDetail.DiskImageSize) 2>/dev/null))
|
||||||
$(eval DRYRUN_IGNORE := false)
|
$(eval IGNORE_DRYRUN := false)
|
||||||
echo DiskImageSize: $(AWS_SNAP_SIZE)
|
echo DiskImageSize: $(AWS_SNAP_SIZE)
|
||||||
|
|
||||||
# target aws-ec2-get-import-snapshot-tasks-status-%: Eval AWS_SNAP_STATUS with import-task-ids %, Echo 'Status: AWS_SNAP_STATUS'
|
# target aws-ec2-get-import-snapshot-tasks-status-%: Eval AWS_SNAP_STATUS with import-task-ids %, Echo 'Status: AWS_SNAP_STATUS'
|
||||||
.PHONY: aws-ec2-get-import-snapshot-tasks-status-%
|
.PHONY: aws-ec2-get-import-snapshot-tasks-status-%
|
||||||
aws-ec2-get-import-snapshot-tasks-status-%: docker-build-aws
|
aws-ec2-get-import-snapshot-tasks-status-%: docker-build-aws
|
||||||
$(eval DRYRUN_IGNORE := true)
|
$(eval IGNORE_DRYRUN := true)
|
||||||
$(eval AWS_SNAP_STATUS := $(shell $(call aws,ec2 describe-import-snapshot-tasks --import-task-ids $* --output text --query ImportSnapshotTasks[0].SnapshotTaskDetail.Status) 2>/dev/null))
|
$(eval AWS_SNAP_STATUS := $(shell $(call aws,ec2 describe-import-snapshot-tasks --import-task-ids $* --output text --query ImportSnapshotTasks[0].SnapshotTaskDetail.Status) 2>/dev/null))
|
||||||
$(eval DRYRUN_IGNORE := false)
|
$(eval IGNORE_DRYRUN := false)
|
||||||
echo Status: $(AWS_SNAP_STATUS)
|
echo Status: $(AWS_SNAP_STATUS)
|
||||||
|
|
||||||
# target aws-ec2-wait-import-snapshot-tasks-status-completed: Fire aws-ec2-wait-import-snapshot-tasks-status-completed-% for AWS_TASK_ID
|
# target aws-ec2-wait-import-snapshot-tasks-status-completed: Fire aws-ec2-wait-import-snapshot-tasks-status-completed-% for AWS_TASK_ID
|
||||||
|
@ -190,9 +190,9 @@ aws-ec2-wait-snapshot-completed-%: docker-build-aws
|
||||||
# target aws-ec2-register-image: Fire aws-ec2-get-import-snapshot-tasks-id, Eval AWS_AMI_ID with Name AWS_AMI_NAME, Echo 'ImageId: AWS_AMI_ID'
|
# target aws-ec2-register-image: Fire aws-ec2-get-import-snapshot-tasks-id, Eval AWS_AMI_ID with Name AWS_AMI_NAME, Echo 'ImageId: AWS_AMI_ID'
|
||||||
.PHONY: aws-ec2-register-image
|
.PHONY: aws-ec2-register-image
|
||||||
aws-ec2-register-image: base docker-build-aws aws-ec2-get-import-snapshot-tasks-id
|
aws-ec2-register-image: base docker-build-aws aws-ec2-get-import-snapshot-tasks-id
|
||||||
$(eval DRYRUN_IGNORE := true)
|
$(eval IGNORE_DRYRUN := true)
|
||||||
$(eval json := $(shell $(call exec,envsubst < aws/register-image-device-mappings.json)))
|
$(eval json := $(shell $(call exec,envsubst < aws/register-image-device-mappings.json)))
|
||||||
$(eval DRYRUN_IGNORE := false)
|
$(eval IGNORE_DRYRUN := false)
|
||||||
$(eval AWS_AMI_ID := $(shell $(call aws,ec2 register-image --name '$(AWS_AMI_NAME)' --description '$(AWS_AMI_DESCRIPTION)' --architecture x86_64 --root-device-name /dev/sda1 --virtualization-type hvm --block-device-mappings '$(json)') 2>/dev/null))
|
$(eval AWS_AMI_ID := $(shell $(call aws,ec2 register-image --name '$(AWS_AMI_NAME)' --description '$(AWS_AMI_DESCRIPTION)' --architecture x86_64 --root-device-name /dev/sda1 --virtualization-type hvm --block-device-mappings '$(json)') 2>/dev/null))
|
||||||
echo ImageId: $(AWS_AMI_ID)
|
echo ImageId: $(AWS_AMI_ID)
|
||||||
|
|
||||||
|
|
|
@ -1,23 +1,9 @@
|
||||||
FROM quay.io/prometheus/alertmanager:latest as dist
|
FROM quay.io/prometheus/alertmanager:latest as dist
|
||||||
LABEL maintainer "jc.iacono.gm@gmail.com"
|
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
|
|
||||||
ARG SLACK_WEBHOOK_ID
|
ARG SLACK_WEBHOOK_ID
|
||||||
|
|
||||||
COPY ${DOCKER_BUILD_DIR}/config.tmpl /etc/alertmanager/config.tmpl
|
COPY ${DOCKER_BUILD_DIR}/config.tmpl /etc/alertmanager/config.tmpl
|
||||||
RUN sed 's@SLACK_WEBHOOK_ID@'"${SLACK_WEBHOOK_ID:-UNDEFINED}"'@g' /etc/alertmanager/config.tmpl > /etc/alertmanager/alertmanager.yml
|
RUN sed 's@SLACK_WEBHOOK_ID@'"${SLACK_WEBHOOK_ID:-UNDEFINED}"'@g' /etc/alertmanager/config.tmpl > /etc/alertmanager/alertmanager.yml
|
||||||
|
|
||||||
FROM dist as local
|
FROM dist as master
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM local as debug
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM local as tests
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM tests as preprod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM preprod as prod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
|
|
|
@ -5,14 +5,14 @@ global:
|
||||||
slack_api_url: SLACK_WEBHOOK_ID
|
slack_api_url: SLACK_WEBHOOK_ID
|
||||||
# The smarthost and SMTP sender used for mail notifications.
|
# The smarthost and SMTP sender used for mail notifications.
|
||||||
# smtp_smarthost: 'localhost:25'
|
# smtp_smarthost: 'localhost:25'
|
||||||
# smtp_from: 'alertmanager@1001pharmacies.com'
|
# smtp_from: 'alertmanager@domain.com'
|
||||||
|
|
||||||
# The root route on which each incoming alert enters.
|
# The root route on which each incoming alert enters.
|
||||||
route:
|
route:
|
||||||
# The root route must not have any matchers as it is the entry point for
|
# The root route must not have any matchers as it is the entry point for
|
||||||
# all alerts. It needs to have a receiver configured so alerts that do not
|
# all alerts. It needs to have a receiver configured so alerts that do not
|
||||||
# match any of the sub-routes are sent to someone.
|
# match any of the sub-routes are sent to someone.
|
||||||
receiver: '1001-slack-default'
|
receiver: 'slack-default'
|
||||||
|
|
||||||
# The labels by which incoming alerts are grouped together. For example,
|
# The labels by which incoming alerts are grouped together. For example,
|
||||||
# multiple alerts coming in for cluster=A and alertname=LatencyHigh would
|
# multiple alerts coming in for cluster=A and alertname=LatencyHigh would
|
||||||
|
@ -52,43 +52,43 @@ route:
|
||||||
severity: "low"
|
severity: "low"
|
||||||
instance: "Hourly GMV"
|
instance: "Hourly GMV"
|
||||||
type: "lower than static threshold"
|
type: "lower than static threshold"
|
||||||
receiver: 1001-slack-gmv-static-low
|
receiver: slack-gmv-static-low
|
||||||
|
|
||||||
- match:
|
- match:
|
||||||
severity: "high"
|
severity: "high"
|
||||||
instance: "Hourly GMV"
|
instance: "Hourly GMV"
|
||||||
type: "lower than static threshold"
|
type: "lower than static threshold"
|
||||||
receiver: 1001-slack-gmv-static-high
|
receiver: slack-gmv-static-high
|
||||||
|
|
||||||
- match:
|
- match:
|
||||||
severity: "low"
|
severity: "low"
|
||||||
instance: "Hourly GMV"
|
instance: "Hourly GMV"
|
||||||
receiver: 1001-slack-gmv-low
|
receiver: slack-gmv-low
|
||||||
|
|
||||||
- match:
|
- match:
|
||||||
severity: "high"
|
severity: "high"
|
||||||
instance: "Hourly GMV"
|
instance: "Hourly GMV"
|
||||||
receiver: 1001-slack-gmv-high
|
receiver: slack-gmv-high
|
||||||
|
|
||||||
- match:
|
- match:
|
||||||
instance: "Hourly GMV test"
|
instance: "Hourly GMV test"
|
||||||
receiver: 1001-slack-gmv-low
|
receiver: slack-gmv-low
|
||||||
|
|
||||||
- match:
|
- match:
|
||||||
severity: "low"
|
severity: "low"
|
||||||
receiver: 1001-slack-generic-low
|
receiver: slack-generic-low
|
||||||
|
|
||||||
- match:
|
- match:
|
||||||
severity: "medium"
|
severity: "medium"
|
||||||
receiver: 1001-slack-generic-medium
|
receiver: slack-generic-medium
|
||||||
|
|
||||||
- match:
|
- match:
|
||||||
severity: "high"
|
severity: "high"
|
||||||
receiver: 1001-slack-generic-high
|
receiver: slack-generic-high
|
||||||
|
|
||||||
- match:
|
- match:
|
||||||
severity: "critical"
|
severity: "critical"
|
||||||
receiver: 1001-slack-generic-critical
|
receiver: slack-generic-critical
|
||||||
|
|
||||||
|
|
||||||
# The service has a sub-route for critical alerts, any alerts
|
# The service has a sub-route for critical alerts, any alerts
|
||||||
|
@ -140,7 +140,7 @@ inhibit_rules:
|
||||||
|
|
||||||
|
|
||||||
receivers:
|
receivers:
|
||||||
- name: '1001-slack-gmv-static-low'
|
- name: 'slack-gmv-static-low'
|
||||||
slack_configs:
|
slack_configs:
|
||||||
- api_url: SLACK_WEBHOOK_ID
|
- api_url: SLACK_WEBHOOK_ID
|
||||||
send_resolved: true
|
send_resolved: true
|
||||||
|
@ -149,7 +149,7 @@ receivers:
|
||||||
title: ':mostly_sunny: {{ .Status|toUpper }} issue on [ {{ .CommonLabels.instance }} ]'
|
title: ':mostly_sunny: {{ .Status|toUpper }} issue on [ {{ .CommonLabels.instance }} ]'
|
||||||
text: "{{ .CommonAnnotations.description }}"
|
text: "{{ .CommonAnnotations.description }}"
|
||||||
|
|
||||||
- name: '1001-slack-gmv-static-high'
|
- name: 'slack-gmv-static-high'
|
||||||
slack_configs:
|
slack_configs:
|
||||||
- api_url: SLACK_WEBHOOK_ID
|
- api_url: SLACK_WEBHOOK_ID
|
||||||
send_resolved: true
|
send_resolved: true
|
||||||
|
@ -158,7 +158,7 @@ receivers:
|
||||||
title: ':tornado: {{ .Status|toUpper }} issue on [ {{ .CommonLabels.instance }} ]'
|
title: ':tornado: {{ .Status|toUpper }} issue on [ {{ .CommonLabels.instance }} ]'
|
||||||
text: "{{ .CommonAnnotations.description }}"
|
text: "{{ .CommonAnnotations.description }}"
|
||||||
|
|
||||||
- name: '1001-slack-gmv-low'
|
- name: 'slack-gmv-low'
|
||||||
slack_configs:
|
slack_configs:
|
||||||
- api_url: SLACK_WEBHOOK_ID
|
- api_url: SLACK_WEBHOOK_ID
|
||||||
send_resolved: true
|
send_resolved: true
|
||||||
|
@ -169,7 +169,7 @@ receivers:
|
||||||
\n
|
\n
|
||||||
\n{{ .CommonAnnotations.query }}"
|
\n{{ .CommonAnnotations.query }}"
|
||||||
|
|
||||||
- name: '1001-slack-gmv-high'
|
- name: 'slack-gmv-high'
|
||||||
slack_configs:
|
slack_configs:
|
||||||
- api_url: SLACK_WEBHOOK_ID
|
- api_url: SLACK_WEBHOOK_ID
|
||||||
send_resolved: true
|
send_resolved: true
|
||||||
|
@ -180,7 +180,7 @@ receivers:
|
||||||
\n
|
\n
|
||||||
\n{{ .CommonAnnotations.query }}"
|
\n{{ .CommonAnnotations.query }}"
|
||||||
|
|
||||||
- name: '1001-slack-generic-low'
|
- name: 'slack-generic-low'
|
||||||
slack_configs:
|
slack_configs:
|
||||||
- api_url: SLACK_WEBHOOK_ID
|
- api_url: SLACK_WEBHOOK_ID
|
||||||
send_resolved: true
|
send_resolved: true
|
||||||
|
@ -189,7 +189,7 @@ receivers:
|
||||||
title: ':mostly_sunny: {{ .Status|toUpper }} issue on [ {{ .CommonLabels.instance }} ]'
|
title: ':mostly_sunny: {{ .Status|toUpper }} issue on [ {{ .CommonLabels.instance }} ]'
|
||||||
text: "*{{ .CommonLabels.instance }}* had a *{{ .CommonLabels.type }}* issue for a few seconds."
|
text: "*{{ .CommonLabels.instance }}* had a *{{ .CommonLabels.type }}* issue for a few seconds."
|
||||||
|
|
||||||
- name: '1001-slack-generic-medium'
|
- name: 'slack-generic-medium'
|
||||||
slack_configs:
|
slack_configs:
|
||||||
- api_url: SLACK_WEBHOOK_ID
|
- api_url: SLACK_WEBHOOK_ID
|
||||||
send_resolved: true
|
send_resolved: true
|
||||||
|
@ -198,7 +198,7 @@ receivers:
|
||||||
title: ':sun_behind_rain_cloud: {{ .Status|toUpper }} issue on [ {{ .CommonLabels.instance }} ]'
|
title: ':sun_behind_rain_cloud: {{ .Status|toUpper }} issue on [ {{ .CommonLabels.instance }} ]'
|
||||||
text: "*{{ .CommonLabels.instance }}* had a *{{ .CommonLabels.type }}* issue for more than 5 minutes."
|
text: "*{{ .CommonLabels.instance }}* had a *{{ .CommonLabels.type }}* issue for more than 5 minutes."
|
||||||
|
|
||||||
- name: '1001-slack-generic-high'
|
- name: 'slack-generic-high'
|
||||||
slack_configs:
|
slack_configs:
|
||||||
- api_url: SLACK_WEBHOOK_ID
|
- api_url: SLACK_WEBHOOK_ID
|
||||||
send_resolved: true
|
send_resolved: true
|
||||||
|
@ -207,7 +207,7 @@ receivers:
|
||||||
title: ':tornado: {{ .Status|toUpper }} issue on {{ .CommonLabels.instance }}'
|
title: ':tornado: {{ .Status|toUpper }} issue on {{ .CommonLabels.instance }}'
|
||||||
text: "*{{ .CommonLabels.instance }}* had a *{{ .CommonLabels.type }}* issue for an hour"
|
text: "*{{ .CommonLabels.instance }}* had a *{{ .CommonLabels.type }}* issue for an hour"
|
||||||
|
|
||||||
- name: '1001-slack-generic-critical'
|
- name: 'slack-generic-critical'
|
||||||
slack_configs:
|
slack_configs:
|
||||||
- api_url: SLACK_WEBHOOK_ID
|
- api_url: SLACK_WEBHOOK_ID
|
||||||
send_resolved: true
|
send_resolved: true
|
||||||
|
@ -216,10 +216,9 @@ receivers:
|
||||||
title: ':boom: {{ .Status|toUpper }} issue on {{ .CommonLabels.instance }}'
|
title: ':boom: {{ .Status|toUpper }} issue on {{ .CommonLabels.instance }}'
|
||||||
text: "*{{ .CommonLabels.instance }}* had a *{{ .CommonLabels.type }}* issue for more than 12 hours"
|
text: "*{{ .CommonLabels.instance }}* had a *{{ .CommonLabels.type }}* issue for more than 12 hours"
|
||||||
|
|
||||||
- name: '1001-slack-default'
|
- name: 'slack-default'
|
||||||
slack_configs:
|
slack_configs:
|
||||||
- api_url: SLACK_WEBHOOK_ID
|
- api_url: SLACK_WEBHOOK_ID
|
||||||
send_resolved: true
|
send_resolved: true
|
||||||
username: 'Chouette Vigilante [default]'
|
username: 'Chouette Vigilante [default]'
|
||||||
icon_emoji: ':owl:'
|
icon_emoji: ':owl:'
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
FROM alpine:latest as dist
|
FROM alpine:latest as dist
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
|
|
||||||
|
LABEL maintainer aynic.os <support+docker@asycn.io>
|
||||||
|
|
||||||
RUN apk --no-cache add \
|
RUN apk --no-cache add \
|
||||||
ansible \
|
ansible \
|
||||||
py3-pip
|
py3-pip
|
||||||
|
@ -10,15 +12,13 @@ RUN pip3 install boto
|
||||||
ENTRYPOINT ["/usr/bin/ansible"]
|
ENTRYPOINT ["/usr/bin/ansible"]
|
||||||
CMD ["--help"]
|
CMD ["--help"]
|
||||||
|
|
||||||
FROM dist as local
|
FROM dist as master
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
ARG UID
|
ARG UID
|
||||||
ARG USER
|
ARG USER
|
||||||
ENV UID=${UID}
|
ENV UID=${UID}
|
||||||
ENV GID=${UID}
|
ENV GID=${UID}
|
||||||
ENV USER=${USER}
|
ENV USER=${USER}
|
||||||
LABEL com.1001pharmacies.uid=${UID}
|
|
||||||
LABEL com.1001pharmacies.user=${USER}
|
|
||||||
|
|
||||||
# If we provide a numeric UID
|
# If we provide a numeric UID
|
||||||
RUN [ "$UID" -eq "$UID" ] 2>/dev/null \
|
RUN [ "$UID" -eq "$UID" ] 2>/dev/null \
|
||||||
|
@ -41,15 +41,3 @@ RUN [ "$UID" -eq "$UID" ] 2>/dev/null \
|
||||||
|| true
|
|| true
|
||||||
|
|
||||||
USER $USER
|
USER $USER
|
||||||
|
|
||||||
FROM local as debug
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM local as tests
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM tests as preprod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM preprod as prod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
FROM docker.elastic.co/apm/apm-server-oss:7.4.2 as dist
|
FROM docker.elastic.co/apm/apm-server-oss:7.4.2 as dist
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
|
|
||||||
LABEL maintainer 1001Pharmacies <technique+docker@1001pharmacies.com>
|
|
||||||
|
|
||||||
# config
|
# config
|
||||||
COPY ${DOCKER_BUILD_DIR}/apm-server.yml /usr/share/apm-server/
|
COPY ${DOCKER_BUILD_DIR}/apm-server.yml /usr/share/apm-server/
|
||||||
|
|
||||||
FROM dist as local
|
FROM dist as master
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
FROM alpine:latest as dist
|
FROM alpine:latest as dist
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
|
|
||||||
|
LABEL maintainer aynic.os <support+docker@asycn.io>
|
||||||
|
|
||||||
RUN apk --no-cache add \
|
RUN apk --no-cache add \
|
||||||
groff \
|
groff \
|
||||||
less \
|
less \
|
||||||
|
@ -12,15 +14,13 @@ RUN apk --no-cache upgrade
|
||||||
ENTRYPOINT ["/usr/bin/aws"]
|
ENTRYPOINT ["/usr/bin/aws"]
|
||||||
CMD ["help"]
|
CMD ["help"]
|
||||||
|
|
||||||
FROM dist as local
|
FROM dist as master
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
ARG UID
|
ARG UID
|
||||||
ARG USER
|
ARG USER
|
||||||
ENV UID=${UID}
|
ENV UID=${UID}
|
||||||
ENV GID=${UID}
|
ENV GID=${UID}
|
||||||
ENV USER=${USER}
|
ENV USER=${USER}
|
||||||
LABEL com.1001pharmacies.uid=${UID}
|
|
||||||
LABEL com.1001pharmacies.user=${USER}
|
|
||||||
|
|
||||||
# If we provide a numeric UID
|
# If we provide a numeric UID
|
||||||
RUN [ "$UID" -eq "$UID" ] 2>/dev/null \
|
RUN [ "$UID" -eq "$UID" ] 2>/dev/null \
|
||||||
|
@ -43,15 +43,3 @@ RUN [ "$UID" -eq "$UID" ] 2>/dev/null \
|
||||||
|| true
|
|| true
|
||||||
|
|
||||||
USER $USER
|
USER $USER
|
||||||
|
|
||||||
FROM local as debug
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM local as tests
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM tests as preprod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM preprod as prod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
|
@ -3,17 +3,5 @@ ARG DOCKER_BUILD_DIR
|
||||||
|
|
||||||
COPY ${DOCKER_BUILD_DIR}/config.yml /etc/blackbox_exporter/config.yml
|
COPY ${DOCKER_BUILD_DIR}/config.yml /etc/blackbox_exporter/config.yml
|
||||||
|
|
||||||
FROM dist as local
|
FROM dist as master
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM local as debug
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM local as tests
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM tests as preprod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM preprod as prod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
|
|
|
@ -1,15 +1,14 @@
|
||||||
FROM alpine:latest as dist
|
FROM alpine:latest as dist
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
|
ARG GIT_AUTHOR_NAME
|
||||||
|
ARG GIT_AUTHOR_EMAIL
|
||||||
|
|
||||||
LABEL maintainer 1001Pharmacies <technique+docker@1001pharmacies.com>
|
LABEL maintainer aynic.os <support+docker@asycn.io>
|
||||||
|
|
||||||
arg GIT_AUTHOR_NAME
|
ENV GIT_AUTHOR_NAME=${GIT_AUTHOR_NAME}
|
||||||
arg GIT_AUTHOR_EMAIL
|
ENV GIT_AUTHOR_EMAIL=${GIT_AUTHOR_EMAIL}
|
||||||
|
ENV GIT_COMMITTER_NAME=${GIT_AUTHOR_NAME}
|
||||||
env GIT_AUTHOR_NAME=${GIT_AUTHOR_NAME:-1001Pharmacies}
|
ENV GIT_COMMITTER_EMAIL=${GIT_AUTHOR_EMAIL}
|
||||||
env GIT_AUTHOR_EMAIL=${GIT_AUTHOR_EMAIL:-technique+docker@1001pharmacies.com}
|
|
||||||
env GIT_COMMITTER_NAME=${GIT_AUTHOR_NAME}
|
|
||||||
env GIT_COMMITTER_EMAIL=${GIT_AUTHOR_EMAIL}
|
|
||||||
|
|
||||||
RUN apk upgrade --no-cache \
|
RUN apk upgrade --no-cache \
|
||||||
&& apk add --no-cache \
|
&& apk add --no-cache \
|
||||||
|
@ -37,7 +36,7 @@ RUN git clone https://github.com/ingydotnet/git-subrepo \
|
||||||
|
|
||||||
CMD ["bash"]
|
CMD ["bash"]
|
||||||
|
|
||||||
FROM dist as local
|
FROM dist as master
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
ARG DOCKER_GID
|
ARG DOCKER_GID
|
||||||
ARG SHELL=/bin/bash
|
ARG SHELL=/bin/bash
|
||||||
|
@ -50,8 +49,6 @@ ARG USER
|
||||||
ENV UID=${UID}
|
ENV UID=${UID}
|
||||||
ENV GID=${UID}
|
ENV GID=${UID}
|
||||||
ENV USER=${USER}
|
ENV USER=${USER}
|
||||||
LABEL com.1001pharmacies.uid=${UID}
|
|
||||||
LABEL com.1001pharmacies.user=${USER}
|
|
||||||
|
|
||||||
# If we provide a numeric UID
|
# If we provide a numeric UID
|
||||||
RUN [ "$UID" -eq "$UID" ] 2>/dev/null \
|
RUN [ "$UID" -eq "$UID" ] 2>/dev/null \
|
||||||
|
@ -124,15 +121,3 @@ RUN mkdir -p ~/.ssh ~/.config/git \
|
||||||
*.swp\n\
|
*.swp\n\
|
||||||
Thumbs.db\n\
|
Thumbs.db\n\
|
||||||
" > ~/.config/git/ignore
|
" > ~/.config/git/ignore
|
||||||
|
|
||||||
FROM local as debug
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM local as tests
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM tests as preprod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM preprod as prod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
FROM consul:1.6.1 as dist
|
FROM consul:1.6.1 as dist
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
|
|
||||||
LABEL maintainer 1001Pharmacies <technique+docker@1001pharmacies.com>
|
LABEL maintainer aynic.os <support+docker@asycn.io>
|
||||||
|
|
||||||
# install docker
|
# install docker
|
||||||
RUN apk add --no-cache bash docker gawk sudo \
|
RUN apk add --no-cache bash docker gawk sudo \
|
||||||
|
@ -17,17 +17,5 @@ RUN chmod +rx /usr/local/bin/container-check-status /usr/local/bin/container-lis
|
||||||
|
|
||||||
HEALTHCHECK CMD goss -g /tests/goss.yml validate --format tap
|
HEALTHCHECK CMD goss -g /tests/goss.yml validate --format tap
|
||||||
|
|
||||||
FROM dist as local
|
FROM dist as master
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM local as debug
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM local as tests
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM tests as preprod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM preprod as prod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
|
|
|
@ -1,22 +1,8 @@
|
||||||
FROM docker.elastic.co/apm/apm-server-oss:7.4.2 as dist
|
FROM docker.elastic.co/apm/apm-server-oss:7.4.2 as dist
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
|
|
||||||
LABEL maintainer 1001Pharmacies <technique+docker@1001pharmacies.com>
|
|
||||||
|
|
||||||
# config
|
# config
|
||||||
COPY ${DOCKER_BUILD_DIR}/apm-server.yml /usr/share/apm-server/
|
COPY ${DOCKER_BUILD_DIR}/apm-server.yml /usr/share/apm-server/
|
||||||
|
|
||||||
FROM dist as local
|
FROM dist as master
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM local as debug
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM local as tests
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM tests as preprod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM preprod as prod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
|
|
|
@ -1,22 +1,8 @@
|
||||||
FROM docker.elastic.co/apm/apm-server-oss:7.4.2 as dist
|
FROM docker.elastic.co/apm/apm-server-oss:7.4.2 as dist
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
|
|
||||||
LABEL maintainer 1001Pharmacies <technique+docker@1001pharmacies.com>
|
|
||||||
|
|
||||||
# config
|
# config
|
||||||
# COPY ${DOCKER_BUILD_DIR}/apm-server.yml /usr/share/apm-server/
|
# COPY ${DOCKER_BUILD_DIR}/apm-server.yml /usr/share/apm-server/
|
||||||
|
|
||||||
FROM dist as local
|
FROM dist as master
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM local as debug
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM local as tests
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM tests as preprod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM preprod as prod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
FROM alpine:latest as dist
|
FROM alpine:latest as dist
|
||||||
LABEL maintainer 1001Pharmacies <technique+docker@1001pharmacies.com>
|
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
|
|
||||||
ARG CURATOR_VERSION=5.8.3
|
ARG CURATOR_VERSION=5.8.3
|
||||||
|
|
||||||
|
LABEL maintainer aynic.os <support+docker@asycn.io>
|
||||||
|
|
||||||
RUN apk --no-cache add \
|
RUN apk --no-cache add \
|
||||||
bash \
|
bash \
|
||||||
py-pip \
|
py-pip \
|
||||||
|
@ -15,7 +15,7 @@ COPY ${DOCKER_BUILD_DIR}/action.yml /etc/curator/
|
||||||
|
|
||||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||||
|
|
||||||
FROM dist as local
|
FROM dist as master
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
|
|
||||||
# install cronlock
|
# install cronlock
|
||||||
|
@ -25,18 +25,3 @@ RUN chmod +rx /usr/bin/cronlock
|
||||||
# install ssmtp
|
# install ssmtp
|
||||||
RUN apk --no-cache add ssmtp && \
|
RUN apk --no-cache add ssmtp && \
|
||||||
echo "FromLineOverride=YES" >> /etc/ssmtp/ssmtp.conf
|
echo "FromLineOverride=YES" >> /etc/ssmtp/ssmtp.conf
|
||||||
|
|
||||||
FROM local as debug
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM local as tests
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM tests as preprod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
COPY build/curator/cronlock.conf /etc/cronlock.conf
|
|
||||||
COPY build/curator/ssmtp.conf /etc/ssmtp/ssmtp.conf
|
|
||||||
|
|
||||||
FROM preprod as prod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
|
@ -3,17 +3,5 @@ ARG DOCKER_BUILD_DIR
|
||||||
|
|
||||||
COPY ${DOCKER_BUILD_DIR}/exporter.cfg /usr/src/app
|
COPY ${DOCKER_BUILD_DIR}/exporter.cfg /usr/src/app
|
||||||
|
|
||||||
FROM dist as local
|
FROM dist as master
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM local as debug
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM local as tests
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM tests as preprod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM preprod as prod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
FROM golang:1.12-alpine AS builder
|
FROM golang:1.12-alpine AS builder
|
||||||
LABEL maintainer 1001Pharmacies <technique+docker@1001pharmacies.com>
|
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
|
|
||||||
ARG GOOFYS_VERSION=v0.20.0
|
ARG GOOFYS_VERSION=v0.20.0
|
||||||
|
|
||||||
|
LABEL maintainer aynic.os <support+docker@asycn.io>
|
||||||
|
|
||||||
WORKDIR /go/src/github.com/kahing/goofys/
|
WORKDIR /go/src/github.com/kahing/goofys/
|
||||||
|
|
||||||
RUN apk --no-cache upgrade \
|
RUN apk --no-cache upgrade \
|
||||||
|
@ -15,6 +15,7 @@ RUN apk --no-cache upgrade \
|
||||||
|
|
||||||
FROM alpine:latest as dist
|
FROM alpine:latest as dist
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
|
|
||||||
RUN apk add --no-cache ca-certificates
|
RUN apk add --no-cache ca-certificates
|
||||||
COPY --from=builder /go/bin/goofys /bin/goofys
|
COPY --from=builder /go/bin/goofys /bin/goofys
|
||||||
|
|
||||||
|
@ -22,17 +23,5 @@ ENTRYPOINT ["/bin/goofys"]
|
||||||
|
|
||||||
# goofys -f --region $REGION --stat-cache-ttl $STAT_CACHE_TTL --type-cache-ttl $TYPE_CACHE_TTL --dir-mode $DIR_MODE --file-mode $FILE_MODE -o nonempty $BUCKET $MOUNT_DIR
|
# goofys -f --region $REGION --stat-cache-ttl $STAT_CACHE_TTL --type-cache-ttl $TYPE_CACHE_TTL --dir-mode $DIR_MODE --file-mode $FILE_MODE -o nonempty $BUCKET $MOUNT_DIR
|
||||||
|
|
||||||
FROM dist as local
|
FROM dist as master
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM local as debug
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM local as tests
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM tests as preprod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM preprod as prod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
FROM grafana/grafana:latest as dist
|
FROM grafana/grafana:latest as dist
|
||||||
LABEL maintainer "jc.iacono.gm@gmail.com"
|
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
|
|
||||||
ARG AWS_ACCESS_KEY
|
ARG AWS_ACCESS_KEY
|
||||||
ARG AWS_SECRET_KEY
|
ARG AWS_SECRET_KEY
|
||||||
ARG MYSQL_GRAFANA_USER
|
ARG MYSQL_GRAFANA_USER
|
||||||
ARG MYSQL_GRAFANA_PASSWORD
|
ARG MYSQL_GRAFANA_PASSWORD
|
||||||
ARG MYSQL_GRAFANA_DB
|
ARG MYSQL_GRAFANA_DB
|
||||||
|
|
||||||
|
LABEL maintainer aynic.os <support+docker@asycn.io>
|
||||||
|
|
||||||
COPY ${DOCKER_BUILD_DIR}/config.ini /etc/grafana/config.ini
|
COPY ${DOCKER_BUILD_DIR}/config.ini /etc/grafana/config.ini
|
||||||
COPY ${DOCKER_BUILD_DIR}/dashboards /etc/grafana/dashboards
|
COPY ${DOCKER_BUILD_DIR}/dashboards /etc/grafana/dashboards
|
||||||
COPY ${DOCKER_BUILD_DIR}/provisioning /etc/grafana/provisioning
|
COPY ${DOCKER_BUILD_DIR}/provisioning /etc/grafana/provisioning
|
||||||
|
@ -23,17 +23,5 @@ USER grafana
|
||||||
|
|
||||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||||
|
|
||||||
FROM dist as local
|
FROM dist as master
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM local as debug
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM local as tests
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM tests as preprod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM preprod as prod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
FROM httpd:alpine as dist
|
FROM httpd:alpine as dist
|
||||||
LABEL maintainer 1001Pharmacies <technique+docker@1001pharmacies.com>
|
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
|
|
||||||
ARG HTTPD_LOAD_MODULE="env expires headers lbmethod_bybusyness lbmethod_byrequests proxy proxy_balancer proxy_fcgi proxy_http setenvif slotmem_shm reqtimeout rewrite"
|
ARG HTTPD_LOAD_MODULE="env expires headers lbmethod_bybusyness lbmethod_byrequests proxy proxy_balancer proxy_fcgi proxy_http setenvif slotmem_shm reqtimeout rewrite"
|
||||||
ARG HTTPD_CONF_EXTRA="default info mpm vhosts"
|
ARG HTTPD_CONF_EXTRA="default info mpm vhosts"
|
||||||
|
|
||||||
|
LABEL maintainer aynic.os <support+docker@asycn.io>
|
||||||
|
|
||||||
RUN sed -E -i \
|
RUN sed -E -i \
|
||||||
-e 's!^#?\s*(LoadModule ('${HTTPD_LOAD_MODULE// /|}')_module modules/mod_('${HTTPD_LOAD_MODULE// /|}').so)\s*!\1!g' \
|
-e 's!^#?\s*(LoadModule ('${HTTPD_LOAD_MODULE// /|}')_module modules/mod_('${HTTPD_LOAD_MODULE// /|}').so)\s*!\1!g' \
|
||||||
-e 's!^#?\s*(Include conf/extra/httpd-('${HTTPD_CONF_EXTRA// /|}').conf)\s*!\1!g' \
|
-e 's!^#?\s*(Include conf/extra/httpd-('${HTTPD_CONF_EXTRA// /|}').conf)\s*!\1!g' \
|
||||||
|
@ -21,23 +21,5 @@ CMD /usr/local/bin/consul-template -log-level info -consul-addr consul:8500 -tem
|
||||||
|
|
||||||
EXPOSE 80/tcp
|
EXPOSE 80/tcp
|
||||||
|
|
||||||
FROM dist as local
|
FROM dist as master
|
||||||
ARG UID
|
|
||||||
ARG USER
|
|
||||||
ENV UID=${UID}
|
|
||||||
ENV GID=${UID}
|
|
||||||
ENV USER=${USER}
|
|
||||||
LABEL com.1001pharmacies.uid=${UID}
|
|
||||||
LABEL com.1001pharmacies.user=${USER}
|
|
||||||
|
|
||||||
FROM local as debug
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM local as tests
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM tests as preprod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM preprod as prod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{{ $serverName := printf "%s.%s.%s" (env "APP") (env "ENV") (env "USER") }}
|
{{ $serverName := printf "%s.%s.%s" (env "APP") (env "ENV") (env "USER") }}
|
||||||
{{ $serviceName := printf "%s-%s-%s-php-9000" (env "USER") (env "ENV") (env "APP") }}
|
{{ $serviceName := printf "%s-%s-%s-php-9000" (env "USER") (env "ENV") (env "APP") }}
|
||||||
<VirtualHost *:80>
|
<VirtualHost *:80>
|
||||||
ServerAdmin technique@1001pharmacies.com
|
ServerAdmin support+apache@asycn.io
|
||||||
DocumentRoot "/var/www/web"
|
DocumentRoot "/var/www/web"
|
||||||
ServerName {{ $serverName }}
|
ServerName {{ $serverName }}
|
||||||
ServerAlias *
|
ServerAlias *
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
FROM mysql:5.6.44 as dist
|
FROM mysql:5.6.44 as dist
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
|
|
||||||
LABEL maintainer 1001Pharmacies <technique+docker@1001pharmacies.com>
|
LABEL maintainer aynic.os <support+docker@asycn.io>
|
||||||
|
|
||||||
# config
|
# config
|
||||||
COPY ${DOCKER_BUILD_DIR}/conf.d/all.cnf /etc/mysql/conf.d/
|
COPY ${DOCKER_BUILD_DIR}/conf.d/all.cnf /etc/mysql/conf.d/
|
||||||
|
@ -13,20 +13,8 @@ COPY ${DOCKER_BUILD_DIR}/goss.yml /tests/goss.yml
|
||||||
|
|
||||||
HEALTHCHECK CMD goss -g /tests/goss.yml validate --format tap
|
HEALTHCHECK CMD goss -g /tests/goss.yml validate --format tap
|
||||||
|
|
||||||
FROM dist as local
|
FROM dist as master
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
|
|
||||||
# config
|
# config
|
||||||
COPY ${DOCKER_BUILD_DIR}/conf.d/local.cnf /etc/mysql/conf.d/
|
COPY ${DOCKER_BUILD_DIR}/conf.d/master.cnf /etc/mysql/conf.d/
|
||||||
|
|
||||||
FROM local as debug
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM local as tests
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM tests as preprod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM preprod as prod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
FROM alpine:latest as dist
|
FROM alpine:latest as dist
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
|
|
||||||
|
LABEL maintainer aynic.os <support+docker@asycn.io>
|
||||||
|
|
||||||
RUN apk --no-cache add libffi openssl python3 py3-pip py3-netifaces
|
RUN apk --no-cache add libffi openssl python3 py3-pip py3-netifaces
|
||||||
|
|
||||||
RUN apk --no-cache add --virtual .build-deps \
|
RUN apk --no-cache add --virtual .build-deps \
|
||||||
|
@ -17,15 +19,13 @@ RUN apk --no-cache upgrade
|
||||||
ENTRYPOINT ["/usr/bin/openstack"]
|
ENTRYPOINT ["/usr/bin/openstack"]
|
||||||
CMD ["help"]
|
CMD ["help"]
|
||||||
|
|
||||||
FROM dist as local
|
FROM dist as master
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
ARG UID
|
ARG UID
|
||||||
ARG USER
|
ARG USER
|
||||||
ENV UID=${UID}
|
ENV UID=${UID}
|
||||||
ENV GID=${UID}
|
ENV GID=${UID}
|
||||||
ENV USER=${USER}
|
ENV USER=${USER}
|
||||||
LABEL com.1001pharmacies.uid=${UID}
|
|
||||||
LABEL com.1001pharmacies.user=${USER}
|
|
||||||
|
|
||||||
# If we provide a numeric UID
|
# If we provide a numeric UID
|
||||||
RUN [ "$UID" -eq "$UID" ] 2>/dev/null \
|
RUN [ "$UID" -eq "$UID" ] 2>/dev/null \
|
||||||
|
@ -48,15 +48,3 @@ RUN [ "$UID" -eq "$UID" ] 2>/dev/null \
|
||||||
|| true
|
|| true
|
||||||
|
|
||||||
USER $USER
|
USER $USER
|
||||||
|
|
||||||
FROM local as debug
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM local as tests
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM tests as preprod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM preprod as prod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
FROM alpine:latest as dist
|
FROM alpine:latest as dist
|
||||||
LABEL maintainer 1001Pharmacies <technique+docker@1001pharmacies.com>
|
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
|
|
||||||
|
LABEL maintainer aynic.os <support+docker@asycn.io>
|
||||||
|
|
||||||
ENV PACKER_VERSION=1.6.6
|
ENV PACKER_VERSION=1.6.6
|
||||||
|
|
||||||
RUN apk --no-cache add \
|
RUN apk --no-cache add \
|
||||||
|
@ -25,15 +26,13 @@ RUN rm -f packer_${PACKER_VERSION}_linux_amd64.zip
|
||||||
|
|
||||||
ENTRYPOINT ["/bin/packer"]
|
ENTRYPOINT ["/bin/packer"]
|
||||||
|
|
||||||
FROM dist as local
|
FROM dist as master
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
ARG UID
|
ARG UID
|
||||||
ARG USER
|
ARG USER
|
||||||
ENV UID=${UID}
|
ENV UID=${UID}
|
||||||
ENV GID=${UID}
|
ENV GID=${UID}
|
||||||
ENV USER=${USER}
|
ENV USER=${USER}
|
||||||
LABEL com.1001pharmacies.uid=${UID}
|
|
||||||
LABEL com.1001pharmacies.user=${USER}
|
|
||||||
|
|
||||||
# If we provide a specific UID
|
# If we provide a specific UID
|
||||||
RUN let $UID >/dev/null 2>&1 \
|
RUN let $UID >/dev/null 2>&1 \
|
||||||
|
@ -56,15 +55,3 @@ RUN let $UID >/dev/null 2>&1 \
|
||||||
|| true
|
|| true
|
||||||
|
|
||||||
USER $USER
|
USER $USER
|
||||||
|
|
||||||
FROM local as debug
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM local as tests
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM tests as preprod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM preprod as prod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme
|
; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme
|
||||||
;
|
;
|
||||||
[subrepo]
|
[subrepo]
|
||||||
remote = ssh://git@github.com/1001Pharmacies/docker-pdns-server
|
remote = ssh://git@github.com/aynicos/docker-pdns-server
|
||||||
branch = master
|
branch = master
|
||||||
commit = 6d3c4ce70cbb38d237be757206bfbf082ce2ba3e
|
commit = 6d3c4ce70cbb38d237be757206bfbf082ce2ba3e
|
||||||
parent = 9de6b77b0d944fe6efa7b020ba7c2dbbba5df4f8
|
parent = 9de6b77b0d944fe6efa7b020ba7c2dbbba5df4f8
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
FROM alpine:3.11 as dist
|
FROM alpine:3.11 as dist
|
||||||
LABEL maintainer "yann.autissier@gmail.com"
|
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
ARG VERSION_PDNS_REC=4.2.1
|
ARG VERSION_PDNS_REC=4.2.1
|
||||||
ARG VERSION_PDNS_AUTH=4.2.1
|
ARG VERSION_PDNS_AUTH=4.2.1
|
||||||
ARG VERSION_PDNS_DNSDIST=1.4.0
|
ARG VERSION_PDNS_DNSDIST=1.4.0
|
||||||
|
|
||||||
|
LABEL maintainer aynic.os <support+docker@asycn.io>
|
||||||
|
|
||||||
RUN apk upgrade --no-cache \
|
RUN apk upgrade --no-cache \
|
||||||
&& apk add --no-cache --virtual .build-deps \
|
&& apk add --no-cache --virtual .build-deps \
|
||||||
autoconf \
|
autoconf \
|
||||||
|
@ -63,17 +64,5 @@ ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||||
|
|
||||||
EXPOSE 53/udp 53/tcp
|
EXPOSE 53/udp 53/tcp
|
||||||
|
|
||||||
FROM dist as local
|
FROM dist as master
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM local as debug
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM local as tests
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM tests as preprod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM preprod as prod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
FROM phabricator/daemon:latest as dist
|
FROM phabricator/daemon:latest as dist
|
||||||
LABEL maintainer 1001Pharmacies <technique+docker@1001pharmacies.com>
|
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
|
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
|
@ -7,17 +6,5 @@ RUN apt-get update \
|
||||||
openssh-client \
|
openssh-client \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
FROM dist as local
|
FROM dist as master
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM local as debug
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM local as tests
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM tests as preprod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM preprod as prod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
|
|
|
@ -1,22 +1,9 @@
|
||||||
FROM phabricator/phabricator:latest as dist
|
FROM phabricator/phabricator:latest as dist
|
||||||
LABEL maintainer 1001Pharmacies <technique+docker@1001pharmacies.com>
|
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
|
|
||||||
RUN { \
|
RUN { \
|
||||||
echo 'mysqli.allow_local_infile = 0'; \
|
echo 'mysqli.allow_local_infile = 0'; \
|
||||||
} > /usr/local/etc/php/conf.d/mysql.ini
|
} > /usr/local/etc/php/conf.d/mysql.ini
|
||||||
|
|
||||||
FROM dist as local
|
FROM dist as master
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM local as debug
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM local as tests
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM tests as preprod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM preprod as prod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
FROM php:5.6-fpm-alpine as dist
|
FROM php:5.6-fpm-alpine as dist
|
||||||
LABEL maintainer 1001Pharmacies <technique+docker@1001pharmacies.com>
|
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
|
|
||||||
ARG AMQP_VERSION=stable
|
ARG AMQP_VERSION=stable
|
||||||
ARG APCU_VERSION=4.0.11
|
ARG APCU_VERSION=4.0.11
|
||||||
ARG BLACKFIRE_VERSION=1.31.0
|
ARG BLACKFIRE_VERSION=1.31.0
|
||||||
|
@ -20,6 +18,8 @@ ARG TWIG_VERSION=1.35.3
|
||||||
ARG XCACHE_VERSION=3.2.0
|
ARG XCACHE_VERSION=3.2.0
|
||||||
ARG XDEBUG_VERSION=2.5.5
|
ARG XDEBUG_VERSION=2.5.5
|
||||||
|
|
||||||
|
LABEL maintainer aynic.os <support+docker@asycn.io>
|
||||||
|
|
||||||
RUN apk --no-cache upgrade \
|
RUN apk --no-cache upgrade \
|
||||||
&& apk add --no-cache --virtual .build-deps \
|
&& apk add --no-cache --virtual .build-deps \
|
||||||
$PHPIZE_DEPS \
|
$PHPIZE_DEPS \
|
||||||
|
@ -203,14 +203,12 @@ WORKDIR /var/www
|
||||||
# redirect LOG_STREAM to stdout and start php-fpm with environment variables from .env
|
# redirect LOG_STREAM to stdout and start php-fpm with environment variables from .env
|
||||||
CMD [ "sh", "-c", "(exec 3<>$LOG_STREAM; cat <&3 >&1 & IFS=$'\n'; exec env $(cat .env 2>/dev/null) php-fpm)" ]
|
CMD [ "sh", "-c", "(exec 3<>$LOG_STREAM; cat <&3 >&1 & IFS=$'\n'; exec env $(cat .env 2>/dev/null) php-fpm)" ]
|
||||||
|
|
||||||
FROM dist as local
|
FROM dist as master
|
||||||
ARG UID
|
ARG UID
|
||||||
ARG USER
|
ARG USER
|
||||||
ENV UID=${UID}
|
ENV UID=${UID}
|
||||||
ENV GID=${UID}
|
ENV GID=${UID}
|
||||||
ENV USER=${USER}
|
ENV USER=${USER}
|
||||||
LABEL com.1001pharmacies.uid=${UID}
|
|
||||||
LABEL com.1001pharmacies.user=${USER}
|
|
||||||
|
|
||||||
# If we provide a specific UID
|
# If we provide a specific UID
|
||||||
RUN let $UID >/dev/null 2>&1 \
|
RUN let $UID >/dev/null 2>&1 \
|
||||||
|
@ -236,17 +234,7 @@ RUN chown -R $USER /usr/local/etc/php/conf.d/
|
||||||
|
|
||||||
USER $USER
|
USER $USER
|
||||||
|
|
||||||
|
ARG SSH_REMOTE_HOSTS
|
||||||
|
|
||||||
RUN mkdir -p ~/.ssh \
|
RUN mkdir -p ~/.ssh \
|
||||||
&& ssh-keyscan -t rsa -H github.com >> ~/.ssh/known_hosts
|
&& ssh-keyscan -t rsa -H $SSH_REMOTE_HOSTS >> ~/.ssh/known_hosts
|
||||||
|
|
||||||
FROM local as debug
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM local as tests
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM tests as preprod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM preprod as prod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
FROM php:7.0-fpm-alpine as dist
|
FROM php:7.0-fpm-alpine as dist
|
||||||
LABEL maintainer 1001Pharmacies <technique+docker@1001pharmacies.com>
|
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
|
|
||||||
ARG AMQP_VERSION=stable
|
ARG AMQP_VERSION=stable
|
||||||
ARG AST_VERSION=stable
|
ARG AST_VERSION=stable
|
||||||
ARG APCU_VERSION=stable
|
ARG APCU_VERSION=stable
|
||||||
|
@ -27,6 +25,8 @@ ARG XDEBUG_VERSION=2.7.2
|
||||||
ARG XHPROF_VERSION=2.2.0
|
ARG XHPROF_VERSION=2.2.0
|
||||||
ARG YAML_VERSION=stable
|
ARG YAML_VERSION=stable
|
||||||
|
|
||||||
|
LABEL maintainer aynic.os <support+docker@asycn.io>
|
||||||
|
|
||||||
RUN apk --no-cache upgrade \
|
RUN apk --no-cache upgrade \
|
||||||
&& apk add --no-cache --virtual .build-deps \
|
&& apk add --no-cache --virtual .build-deps \
|
||||||
$PHPIZE_DEPS \
|
$PHPIZE_DEPS \
|
||||||
|
@ -234,14 +234,12 @@ WORKDIR /var/www
|
||||||
# redirect LOG_STREAM to stdout and start php-fpm with environment variables from .env
|
# redirect LOG_STREAM to stdout and start php-fpm with environment variables from .env
|
||||||
CMD [ "sh", "-c", "(exec 3<>$LOG_STREAM; cat <&3 >&1 & IFS=$'\n'; exec env $(cat .env 2>/dev/null) php-fpm)" ]
|
CMD [ "sh", "-c", "(exec 3<>$LOG_STREAM; cat <&3 >&1 & IFS=$'\n'; exec env $(cat .env 2>/dev/null) php-fpm)" ]
|
||||||
|
|
||||||
FROM dist as local
|
FROM dist as master
|
||||||
ARG UID
|
ARG UID
|
||||||
ARG USER
|
ARG USER
|
||||||
ENV UID=${UID}
|
ENV UID=${UID}
|
||||||
ENV GID=${UID}
|
ENV GID=${UID}
|
||||||
ENV USER=${USER}
|
ENV USER=${USER}
|
||||||
LABEL com.1001pharmacies.uid=${UID}
|
|
||||||
LABEL com.1001pharmacies.user=${USER}
|
|
||||||
|
|
||||||
# If we provide a specific UID
|
# If we provide a specific UID
|
||||||
RUN let $UID >/dev/null 2>&1 \
|
RUN let $UID >/dev/null 2>&1 \
|
||||||
|
@ -267,17 +265,7 @@ RUN chown -R $USER /usr/local/etc/php/conf.d/
|
||||||
|
|
||||||
USER $USER
|
USER $USER
|
||||||
|
|
||||||
|
ARG SSH_REMOTE_HOSTS
|
||||||
|
|
||||||
RUN mkdir -p ~/.ssh \
|
RUN mkdir -p ~/.ssh \
|
||||||
&& ssh-keyscan -t rsa -H github.com >> ~/.ssh/known_hosts
|
&& ssh-keyscan -t rsa -H $SSH_REMOTE_HOSTS >> ~/.ssh/known_hosts
|
||||||
|
|
||||||
FROM local as debug
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM local as tests
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM tests as preprod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM preprod as prod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
FROM php:7.1-fpm-alpine as dist
|
FROM php:7.1-fpm-alpine as dist
|
||||||
LABEL maintainer 1001Pharmacies <technique+docker@1001pharmacies.com>
|
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
|
|
||||||
ARG AMQP_VERSION=stable
|
ARG AMQP_VERSION=stable
|
||||||
ARG AST_VERSION=stable
|
ARG AST_VERSION=stable
|
||||||
ARG APCU_VERSION=stable
|
ARG APCU_VERSION=stable
|
||||||
|
@ -27,6 +25,8 @@ ARG XDEBUG_VERSION=stable
|
||||||
ARG XHPROF_VERSION=2.2.0
|
ARG XHPROF_VERSION=2.2.0
|
||||||
ARG YAML_VERSION=stable
|
ARG YAML_VERSION=stable
|
||||||
|
|
||||||
|
LABEL maintainer aynic.os <support+docker@asycn.io>
|
||||||
|
|
||||||
RUN apk --no-cache upgrade \
|
RUN apk --no-cache upgrade \
|
||||||
&& apk add --no-cache --virtual .build-deps \
|
&& apk add --no-cache --virtual .build-deps \
|
||||||
$PHPIZE_DEPS \
|
$PHPIZE_DEPS \
|
||||||
|
@ -226,14 +226,12 @@ WORKDIR /var/www
|
||||||
# redirect LOG_STREAM to stdout and start php-fpm with environment variables from .env
|
# redirect LOG_STREAM to stdout and start php-fpm with environment variables from .env
|
||||||
CMD [ "sh", "-c", "(exec 3<>$LOG_STREAM; cat <&3 >&1 & IFS=$'\n'; exec env $(cat .env 2>/dev/null) php-fpm)" ]
|
CMD [ "sh", "-c", "(exec 3<>$LOG_STREAM; cat <&3 >&1 & IFS=$'\n'; exec env $(cat .env 2>/dev/null) php-fpm)" ]
|
||||||
|
|
||||||
FROM dist as local
|
FROM dist as master
|
||||||
ARG UID
|
ARG UID
|
||||||
ARG USER
|
ARG USER
|
||||||
ENV UID=${UID}
|
ENV UID=${UID}
|
||||||
ENV GID=${UID}
|
ENV GID=${UID}
|
||||||
ENV USER=${USER}
|
ENV USER=${USER}
|
||||||
LABEL com.1001pharmacies.uid=${UID}
|
|
||||||
LABEL com.1001pharmacies.user=${USER}
|
|
||||||
|
|
||||||
# If we provide a specific UID
|
# If we provide a specific UID
|
||||||
RUN let $UID >/dev/null 2>&1 \
|
RUN let $UID >/dev/null 2>&1 \
|
||||||
|
@ -259,17 +257,7 @@ RUN chown -R $USER /usr/local/etc/php/conf.d/
|
||||||
|
|
||||||
USER $USER
|
USER $USER
|
||||||
|
|
||||||
|
ARG SSH_REMOTE_HOSTS
|
||||||
|
|
||||||
RUN mkdir -p ~/.ssh \
|
RUN mkdir -p ~/.ssh \
|
||||||
&& ssh-keyscan -t rsa -H github.com >> ~/.ssh/known_hosts
|
&& ssh-keyscan -t rsa -H $SSH_REMOTE_HOSTS >> ~/.ssh/known_hosts
|
||||||
|
|
||||||
FROM local as debug
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM local as tests
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM tests as preprod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM preprod as prod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
FROM php:7.2-fpm-alpine as dist
|
FROM php:7.2-fpm-alpine as dist
|
||||||
LABEL maintainer 1001Pharmacies <technique+docker@1001pharmacies.com>
|
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
|
|
||||||
ARG AMQP_VERSION=stable
|
ARG AMQP_VERSION=stable
|
||||||
ARG AST_VERSION=stable
|
ARG AST_VERSION=stable
|
||||||
ARG APCU_VERSION=stable
|
ARG APCU_VERSION=stable
|
||||||
|
@ -27,6 +25,8 @@ ARG XDEBUG_VERSION=stable
|
||||||
ARG XHPROF_VERSION=2.2.0
|
ARG XHPROF_VERSION=2.2.0
|
||||||
ARG YAML_VERSION=stable
|
ARG YAML_VERSION=stable
|
||||||
|
|
||||||
|
LABEL maintainer aynic.os <support+docker@asycn.io>
|
||||||
|
|
||||||
RUN apk --no-cache upgrade \
|
RUN apk --no-cache upgrade \
|
||||||
&& apk add --no-cache --virtual .build-deps \
|
&& apk add --no-cache --virtual .build-deps \
|
||||||
$PHPIZE_DEPS \
|
$PHPIZE_DEPS \
|
||||||
|
@ -231,14 +231,12 @@ WORKDIR /var/www
|
||||||
# redirect LOG_STREAM to stdout and start php-fpm with environment variables from .env
|
# redirect LOG_STREAM to stdout and start php-fpm with environment variables from .env
|
||||||
CMD [ "sh", "-c", "(exec 3<>$LOG_STREAM; cat <&3 >&1 & IFS=$'\n'; exec env $(cat .env 2>/dev/null) php-fpm)" ]
|
CMD [ "sh", "-c", "(exec 3<>$LOG_STREAM; cat <&3 >&1 & IFS=$'\n'; exec env $(cat .env 2>/dev/null) php-fpm)" ]
|
||||||
|
|
||||||
FROM dist as local
|
FROM dist as master
|
||||||
ARG UID
|
ARG UID
|
||||||
ARG USER
|
ARG USER
|
||||||
ENV UID=${UID}
|
ENV UID=${UID}
|
||||||
ENV GID=${UID}
|
ENV GID=${UID}
|
||||||
ENV USER=${USER}
|
ENV USER=${USER}
|
||||||
LABEL com.1001pharmacies.uid=${UID}
|
|
||||||
LABEL com.1001pharmacies.user=${USER}
|
|
||||||
|
|
||||||
# If we provide a specific UID
|
# If we provide a specific UID
|
||||||
RUN let $UID >/dev/null 2>&1 \
|
RUN let $UID >/dev/null 2>&1 \
|
||||||
|
@ -264,17 +262,7 @@ RUN chown -R $USER /usr/local/etc/php/conf.d/
|
||||||
|
|
||||||
USER $USER
|
USER $USER
|
||||||
|
|
||||||
|
ARG SSH_REMOTE_HOSTS
|
||||||
|
|
||||||
RUN mkdir -p ~/.ssh \
|
RUN mkdir -p ~/.ssh \
|
||||||
&& ssh-keyscan -t rsa -H github.com >> ~/.ssh/known_hosts
|
&& ssh-keyscan -t rsa -H $SSH_REMOTE_HOSTS >> ~/.ssh/known_hosts
|
||||||
|
|
||||||
FROM local as debug
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM local as tests
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM tests as preprod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM preprod as prod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
FROM php:7.3-fpm-alpine as dist
|
FROM php:7.3-fpm-alpine as dist
|
||||||
LABEL maintainer 1001Pharmacies <technique+docker@1001pharmacies.com>
|
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
|
|
||||||
ARG AMQP_VERSION=stable
|
ARG AMQP_VERSION=stable
|
||||||
ARG AST_VERSION=stable
|
ARG AST_VERSION=stable
|
||||||
ARG APCU_VERSION=stable
|
ARG APCU_VERSION=stable
|
||||||
|
@ -26,6 +24,8 @@ ARG XDEBUG_VERSION=stable
|
||||||
ARG XHPROF_VERSION=2.2.0
|
ARG XHPROF_VERSION=2.2.0
|
||||||
ARG YAML_VERSION=stable
|
ARG YAML_VERSION=stable
|
||||||
|
|
||||||
|
LABEL maintainer aynic.os <support+docker@asycn.io>
|
||||||
|
|
||||||
RUN apk --no-cache upgrade \
|
RUN apk --no-cache upgrade \
|
||||||
&& apk add --no-cache --virtual .build-deps \
|
&& apk add --no-cache --virtual .build-deps \
|
||||||
$PHPIZE_DEPS \
|
$PHPIZE_DEPS \
|
||||||
|
@ -228,14 +228,12 @@ RUN ln -s /shared /var/www/shared
|
||||||
WORKDIR /var/www
|
WORKDIR /var/www
|
||||||
CMD [ "sh", "-c", "(IFS=$'\n'; exec env $(cat .env 2>/dev/null) php-fpm)" ]
|
CMD [ "sh", "-c", "(IFS=$'\n'; exec env $(cat .env 2>/dev/null) php-fpm)" ]
|
||||||
|
|
||||||
FROM dist as local
|
FROM dist as master
|
||||||
ARG UID
|
ARG UID
|
||||||
ARG USER
|
ARG USER
|
||||||
ENV UID=${UID}
|
ENV UID=${UID}
|
||||||
ENV GID=${UID}
|
ENV GID=${UID}
|
||||||
ENV USER=${USER}
|
ENV USER=${USER}
|
||||||
LABEL com.1001pharmacies.uid=${UID}
|
|
||||||
LABEL com.1001pharmacies.user=${USER}
|
|
||||||
|
|
||||||
# If we provide a specific UID
|
# If we provide a specific UID
|
||||||
RUN let $UID >/dev/null 2>&1 \
|
RUN let $UID >/dev/null 2>&1 \
|
||||||
|
@ -261,17 +259,7 @@ RUN chown -R $USER /usr/local/etc/php/conf.d/
|
||||||
|
|
||||||
USER $USER
|
USER $USER
|
||||||
|
|
||||||
|
ARG SSH_REMOTE_HOSTS
|
||||||
|
|
||||||
RUN mkdir -p ~/.ssh \
|
RUN mkdir -p ~/.ssh \
|
||||||
&& ssh-keyscan -t rsa -H github.com >> ~/.ssh/known_hosts
|
&& ssh-keyscan -t rsa -H $SSH_REMOTE_HOSTS >> ~/.ssh/known_hosts
|
||||||
|
|
||||||
FROM local as debug
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM local as tests
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM tests as preprod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM preprod as prod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
FROM quay.io/prometheus/prometheus:latest as dist
|
FROM quay.io/prometheus/prometheus:latest as dist
|
||||||
LABEL maintainer "jc.iacono.gm@gmail.com"
|
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
|
|
||||||
ARG MONITORING_PRIMARY_TARGETS_BLACKBOX
|
ARG MONITORING_PRIMARY_TARGETS_BLACKBOX
|
||||||
ARG MONITORING_SECONDARY_TARGETS_BLACKBOX
|
ARG MONITORING_SECONDARY_TARGETS_BLACKBOX
|
||||||
|
|
||||||
|
LABEL maintainer aynic.os <support+docker@asycn.io>
|
||||||
|
|
||||||
COPY ${DOCKER_BUILD_DIR}/prometheus.tmpl /etc/prometheus/prometheus.tmpl
|
COPY ${DOCKER_BUILD_DIR}/prometheus.tmpl /etc/prometheus/prometheus.tmpl
|
||||||
COPY ${DOCKER_BUILD_DIR}/alert-rules.yml /etc/prometheus/alert-rules.yml
|
COPY ${DOCKER_BUILD_DIR}/alert-rules.yml /etc/prometheus/alert-rules.yml
|
||||||
|
|
||||||
|
@ -18,17 +18,5 @@ COPY ${DOCKER_BUILD_DIR}/docker-entrypoint.sh /
|
||||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||||
CMD []
|
CMD []
|
||||||
|
|
||||||
FROM dist as local
|
FROM dist as master
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM local as debug
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM local as tests
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM tests as preprod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM preprod as prod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
FROM golang:1.9.4-alpine3.7 AS builder
|
FROM golang:1.9.4-alpine3.7 AS builder
|
||||||
LABEL maintainer 1001Pharmacies <technique+docker@1001pharmacies.com>
|
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
|
ARG GIT_AUTHOR_NAME
|
||||||
|
ARG GIT_AUTHOR_EMAIL
|
||||||
|
|
||||||
arg GIT_AUTHOR_NAME
|
LABEL maintainer aynic.os <support+docker@asycn.io>
|
||||||
arg GIT_AUTHOR_EMAIL
|
|
||||||
|
|
||||||
env GIT_AUTHOR_NAME=${GIT_AUTHOR_NAME:-1001Pharmacies}
|
ENV GIT_AUTHOR_NAME=${GIT_AUTHOR_NAME}
|
||||||
env GIT_AUTHOR_EMAIL=${GIT_AUTHOR_EMAIL:-technique+docker@1001pharmacies.com}
|
ENV GIT_AUTHOR_EMAIL=${GIT_AUTHOR_EMAIL}
|
||||||
env GIT_COMMITTER_NAME=${GIT_AUTHOR_NAME}
|
ENV GIT_COMMITTER_NAME=${GIT_AUTHOR_NAME}
|
||||||
env GIT_COMMITTER_EMAIL=${GIT_AUTHOR_EMAIL}
|
ENV GIT_COMMITTER_EMAIL=${GIT_AUTHOR_EMAIL}
|
||||||
|
|
||||||
WORKDIR /go/src/github.com/gliderlabs/registrator/
|
WORKDIR /go/src/github.com/gliderlabs/registrator/
|
||||||
RUN \
|
RUN \
|
||||||
|
@ -39,17 +39,5 @@ COPY --from=builder /go/src/github.com/gliderlabs/registrator/bin/registrator /b
|
||||||
|
|
||||||
ENTRYPOINT ["/bin/registrator"]
|
ENTRYPOINT ["/bin/registrator"]
|
||||||
|
|
||||||
FROM dist as local
|
FROM dist as master
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM local as debug
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM local as tests
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM tests as preprod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM preprod as prod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
FROM alpine:latest as dist
|
FROM alpine:latest as dist
|
||||||
LABEL maintainer 1001Pharmacies <technique+docker@1001pharmacies.com>
|
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
|
|
||||||
|
LABEL maintainer aynic.os <support+docker@asycn.io>
|
||||||
|
|
||||||
WORKDIR /usr/src
|
WORKDIR /usr/src
|
||||||
|
|
||||||
# Install riofs
|
# Install riofs
|
||||||
|
@ -40,17 +41,5 @@ RUN apk upgrade --no-cache \
|
||||||
|
|
||||||
ENTRYPOINT /usr/local/bin/riofs
|
ENTRYPOINT /usr/local/bin/riofs
|
||||||
|
|
||||||
FROM dist as local
|
FROM dist as master
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM local as debug
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM local as tests
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM tests as preprod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM preprod as prod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
FROM alpine:latest as dist
|
FROM alpine:latest as dist
|
||||||
LABEL maintainer 1001Pharmacies <technique+docker@1001pharmacies.com>
|
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
|
|
||||||
ARG S3FS_VERSION=v1.85
|
ARG S3FS_VERSION=v1.85
|
||||||
|
|
||||||
|
LABEL maintainer aynic.os <support+docker@asycn.io>
|
||||||
|
|
||||||
# Install s3fs-fuse
|
# Install s3fs-fuse
|
||||||
RUN apk --no-cache upgrade \
|
RUN apk --no-cache upgrade \
|
||||||
&& apk --no-cache add --virtual .build-deps \
|
&& apk --no-cache add --virtual .build-deps \
|
||||||
|
@ -40,15 +40,13 @@ VOLUME ${S3FS_DIR}
|
||||||
COPY ${DOCKER_BUILD_DIR}/docker-entrypoint.sh /
|
COPY ${DOCKER_BUILD_DIR}/docker-entrypoint.sh /
|
||||||
ENTRYPOINT /docker-entrypoint.sh
|
ENTRYPOINT /docker-entrypoint.sh
|
||||||
|
|
||||||
FROM dist as local
|
FROM dist as master
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
ARG UID=0
|
ARG UID=0
|
||||||
ARG USER=root
|
ARG USER=root
|
||||||
ENV UID=${UID}
|
ENV UID=${UID}
|
||||||
ENV GID=${UID}
|
ENV GID=${UID}
|
||||||
ENV USER=${USER}
|
ENV USER=${USER}
|
||||||
LABEL com.1001pharmacies.uid=${UID}
|
|
||||||
LABEL com.1001pharmacies.user=${USER}
|
|
||||||
|
|
||||||
# If we provide a specific UID
|
# If we provide a specific UID
|
||||||
RUN let $UID >/dev/null 2>&1 \
|
RUN let $UID >/dev/null 2>&1 \
|
||||||
|
@ -69,15 +67,3 @@ RUN let $UID >/dev/null 2>&1 \
|
||||||
&& mkdir -p /home/$USER \
|
&& mkdir -p /home/$USER \
|
||||||
&& chown $UID:$GID /home/$USER \
|
&& chown $UID:$GID /home/$USER \
|
||||||
|| true
|
|| true
|
||||||
|
|
||||||
FROM local as debug
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM local as tests
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM tests as preprod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM preprod as prod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
|
@ -1,15 +1,14 @@
|
||||||
FROM sematext/logagent:latest as dist
|
FROM sematext/logagent:latest as dist
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
|
ARG GIT_AUTHOR_NAME
|
||||||
|
ARG GIT_AUTHOR_EMAIL
|
||||||
|
|
||||||
LABEL maintainer 1001Pharmacies <technique+docker@1001pharmacies.com>
|
LABEL maintainer aynic.os <support+docker@asycn.io>
|
||||||
|
|
||||||
arg GIT_AUTHOR_NAME
|
ENV GIT_AUTHOR_NAME=${GIT_AUTHOR_NAME}
|
||||||
arg GIT_AUTHOR_EMAIL
|
ENV GIT_AUTHOR_EMAIL=${GIT_AUTHOR_EMAIL}
|
||||||
|
ENV GIT_COMMITTER_NAME=${GIT_AUTHOR_NAME}
|
||||||
env GIT_AUTHOR_NAME=${GIT_AUTHOR_NAME:-1001Pharmacies}
|
ENV GIT_COMMITTER_EMAIL=${GIT_AUTHOR_EMAIL}
|
||||||
env GIT_AUTHOR_EMAIL=${GIT_AUTHOR_EMAIL:-technique+docker@1001pharmacies.com}
|
|
||||||
env GIT_COMMITTER_NAME=${GIT_AUTHOR_NAME}
|
|
||||||
env GIT_COMMITTER_EMAIL=${GIT_AUTHOR_EMAIL}
|
|
||||||
|
|
||||||
RUN apk add --no-cache \
|
RUN apk add --no-cache \
|
||||||
git
|
git
|
||||||
|
@ -21,17 +20,5 @@ RUN cd / \
|
||||||
&& git rebase d168bd0e8745a077e962248741f6be9fbeb7a8b5 \
|
&& git rebase d168bd0e8745a077e962248741f6be9fbeb7a8b5 \
|
||||||
&& git stash pop
|
&& git stash pop
|
||||||
|
|
||||||
FROM dist as local
|
FROM dist as master
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM local as debug
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM local as tests
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM tests as preprod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM preprod as prod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
FROM alpine:latest as dist
|
FROM alpine:latest as dist
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
|
|
||||||
LABEL maintainer 1001Pharmacies <technique+docker@1001pharmacies.com>
|
LABEL maintainer aynic.os <support+docker@asycn.io>
|
||||||
|
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
RUN apk add --no-cache \
|
RUN apk add --no-cache \
|
||||||
|
@ -22,7 +22,7 @@ ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||||
|
|
||||||
CMD ["ssh-agent"]
|
CMD ["ssh-agent"]
|
||||||
|
|
||||||
FROM dist as local
|
FROM dist as master
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
ARG UID
|
ARG UID
|
||||||
ARG GID
|
ARG GID
|
||||||
|
@ -30,8 +30,6 @@ ARG USER
|
||||||
ENV UID=${UID}
|
ENV UID=${UID}
|
||||||
ENV GID=${UID}
|
ENV GID=${UID}
|
||||||
ENV USER=${USER}
|
ENV USER=${USER}
|
||||||
LABEL com.1001pharmacies.uid=${UID}
|
|
||||||
LABEL com.1001pharmacies.user=${USER}
|
|
||||||
|
|
||||||
# If we provide a specific UID
|
# If we provide a specific UID
|
||||||
RUN let $UID >/dev/null 2>&1 \
|
RUN let $UID >/dev/null 2>&1 \
|
||||||
|
@ -54,15 +52,3 @@ RUN let $UID >/dev/null 2>&1 \
|
||||||
|| true
|
|| true
|
||||||
|
|
||||||
USER $USER
|
USER $USER
|
||||||
|
|
||||||
FROM local as debug
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM local as tests
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM tests as preprod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM preprod as prod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
FROM hashicorp/terraform:light as dist
|
FROM hashicorp/terraform:light as dist
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
|
|
||||||
|
LABEL maintainer aynic.os <support+docker@asycn.io>
|
||||||
|
|
||||||
RUN apk --no-cache upgrade
|
RUN apk --no-cache upgrade
|
||||||
|
|
||||||
FROM dist as local
|
FROM dist as master
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
ARG UID
|
ARG UID
|
||||||
ARG USER
|
ARG USER
|
||||||
ENV UID=${UID}
|
ENV UID=${UID}
|
||||||
ENV GID=${UID}
|
ENV GID=${UID}
|
||||||
ENV USER=${USER}
|
ENV USER=${USER}
|
||||||
LABEL com.1001pharmacies.uid=${UID}
|
|
||||||
LABEL com.1001pharmacies.user=${USER}
|
|
||||||
|
|
||||||
# If we provide a numeric UID
|
# If we provide a numeric UID
|
||||||
RUN [ "$UID" -eq "$UID" ] 2>/dev/null \
|
RUN [ "$UID" -eq "$UID" ] 2>/dev/null \
|
||||||
|
@ -34,15 +34,3 @@ RUN [ "$UID" -eq "$UID" ] 2>/dev/null \
|
||||||
|| true
|
|| true
|
||||||
|
|
||||||
USER $USER
|
USER $USER
|
||||||
|
|
||||||
FROM local as debug
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM local as tests
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM tests as preprod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM preprod as prod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
|
@ -1,3 +1,2 @@
|
||||||
new-session -A -s aws-preprod
|
new-session -A -s aws-preprod
|
||||||
run-shell "ssh sshuser@ssh-bastion make list-nodes |sed '1d' |awk '$1 ~ /^enovasante.aws-eu-west-1.web.(preprod.[a-z]+-[0-9a-z]+|[a-z]+pp-[0-9a-z]+)$/' |while read host ip; do type=\${host#*web.}; type=\${type#*preprod.}; type=\${type#*preprod-}; num=\$(printf '%0d' \${ip}); num=\$(echo \${ip} | tr . '\n' | awk '{n = n*256 + $1} END{print n}'); tmux neww -t aws-preprod:\$num -n \$type '/bin/bash -cli \"force ssh -Aqt ssh-bastion ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no 'enovadmin@\$ip'\"'; done"
|
run-shell "ssh sshuser@ssh-bastion make list-nodes |sed '1d' |awk '$1 ~ /^aws\.preprod\.[0-9a-z]+$/' |while read host ip; do type=\${host#*preprod.}; num=\$(printf '%0d' \${ip}); num=\$(echo \${ip} | tr . '\n' | awk '{n = n*256 + $1} END{print n}'); tmux neww -t aws-preprod:\$num -n \$type '/bin/bash -cli \"force ssh -Aqt ssh-bastion ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no 'root@\$ip'\"'; done"
|
||||||
run-shell "ssh sshuser@ssh-bastion make list-nodes |sed '1d' |awk '$1 ~ /^1001pharmacies\.preprod\.[0-9a-z]+$/' |while read host ip; do type=\${host#*preprod.}; num=\$(printf '%0d' \${ip}); num=\$(echo \${ip} | tr . '\n' | awk '{n = n*256 + $1} END{print n}'); tmux neww -t aws-preprod:\$num -n \$type '/bin/bash -cli \"force ssh -Aqt ssh-bastion ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no 'root@\$ip'\"'; done"
|
|
||||||
|
|
|
@ -1,3 +1,2 @@
|
||||||
new-session -A -s aws-prod
|
new-session -A -s aws-prod
|
||||||
run-shell "ssh sshuser@ssh-bastion make list-nodes |sed '1d' |awk '$1 ~ /^1001pharmacies\.prod\.[0-9a-z]+$/' |while read host ip; do type=\${host#*prod.}; num=\$(printf '%0d' \${ip}); num=\$(echo \${ip} | tr . '\n' | awk '{n = n*256 + $1} END{print n}'); tmux neww -t aws-prod:\$num -n \$type '/bin/bash -cli \"force ssh -Aqt ssh-bastion ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no 'root@\$ip'\"'; done"
|
run-shell "ssh sshuser@ssh-bastion make list-nodes |sed '1d' |awk '$1 ~ /^aws\.prod\.[0-9a-z]+$/' |while read host ip; do type=\${host#*prod.}; num=\$(printf '%0d' \${ip}); num=\$(echo \${ip} | tr . '\n' | awk '{n = n*256 + $1} END{print n}'); tmux neww -t aws-prod:\$num -n \$type '/bin/bash -cli \"force ssh -Aqt ssh-bastion ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no 'root@\$ip'\"'; done"
|
||||||
run-shell "ssh sshuser@ssh-bastion make list-nodes |sed '1d' |awk '$1 ~ /enovasante.aws-eu-west-1.web.[a-z]+[^pp]-[0-9a-z]+$/' |while read host ip; do type=\${host#*web.}; num=\$(printf '%0d' \${ip}); num=\$(echo \${ip} | tr . '\n' | awk '{n = n*256 + $1} END{print n}'); tmux neww -t aws-prod:\$num -n \$type '/bin/bash -cli \"force ssh -Aqt ssh-bastion ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no 'enovadmin@\$ip'\"'; done"
|
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
FROM ubuntu:18.04 as dist
|
FROM ubuntu:18.04 as dist
|
||||||
LABEL maintainer 1001Pharmacies <technique+docker@1001pharmacies.com>
|
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
# https://github.com/theia-ide/theia-apps/blob/master/theia-full-docker/Dockerfile
|
# https://github.com/theia-ide/theia-apps/blob/master/theia-full-docker/Dockerfile
|
||||||
|
|
||||||
|
LABEL maintainer aynic.os <support+docker@asycn.io>
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
|
|
||||||
#Common deps
|
#Common deps
|
||||||
|
@ -157,7 +158,7 @@ RUN apt-get install -y \
|
||||||
## Common tools
|
## Common tools
|
||||||
RUN apt-get -y install nano screen tig tmux vim-nox zsh
|
RUN apt-get -y install nano screen tig tmux vim-nox zsh
|
||||||
|
|
||||||
FROM dist as local
|
FROM dist as master
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
ARG DOCKER_GID
|
ARG DOCKER_GID
|
||||||
ARG SHELL=/bin/bash
|
ARG SHELL=/bin/bash
|
||||||
|
@ -171,9 +172,6 @@ ARG USER
|
||||||
ENV UID=${UID}
|
ENV UID=${UID}
|
||||||
ENV GID=${GID:-${UID}}
|
ENV GID=${GID:-${UID}}
|
||||||
ENV USER=${USER:-root}
|
ENV USER=${USER:-root}
|
||||||
LABEL com.1001pharmacies.uid=${UID}
|
|
||||||
LABEL com.1001pharmacies.gid=${GID}
|
|
||||||
LABEL com.1001pharmacies.user=${USER}
|
|
||||||
|
|
||||||
# If we provide a numeric UID
|
# If we provide a numeric UID
|
||||||
RUN [ "$UID" -eq "$UID" ] 2>/dev/null \
|
RUN [ "$UID" -eq "$UID" ] 2>/dev/null \
|
||||||
|
@ -258,8 +256,8 @@ COPY ${DOCKER_BUILD_DIR}/.tmux /home/$USER/.tmux/
|
||||||
ARG GIT_AUTHOR_NAME
|
ARG GIT_AUTHOR_NAME
|
||||||
ARG GIT_AUTHOR_EMAIL
|
ARG GIT_AUTHOR_EMAIL
|
||||||
|
|
||||||
ENV GIT_AUTHOR_NAME=${GIT_AUTHOR_NAME:-1001Pharmacies}
|
ENV GIT_AUTHOR_NAME=${GIT_AUTHOR_NAME}
|
||||||
ENV GIT_AUTHOR_EMAIL=${GIT_AUTHOR_EMAIL:-technique+docker@1001pharmacies.com}
|
ENV GIT_AUTHOR_EMAIL=${GIT_AUTHOR_EMAIL}
|
||||||
ENV GIT_COMMITTER_NAME=${GIT_AUTHOR_NAME}
|
ENV GIT_COMMITTER_NAME=${GIT_AUTHOR_NAME}
|
||||||
ENV GIT_COMMITTER_EMAIL=${GIT_AUTHOR_EMAIL}
|
ENV GIT_COMMITTER_EMAIL=${GIT_AUTHOR_EMAIL}
|
||||||
|
|
||||||
|
@ -268,15 +266,3 @@ ENV WORKSPACE_DIR=/Sources
|
||||||
|
|
||||||
ENTRYPOINT yarn theia start $WORKSPACE_DIR --hostname=0.0.0.0
|
ENTRYPOINT yarn theia start $WORKSPACE_DIR --hostname=0.0.0.0
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|
||||||
FROM local as debug
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM local as tests
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM tests as preprod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM preprod as prod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
toggleApp.constant('TOGGLE_API_BASE_URL', 'http://toggle-api.local.1001pharmacies.com');
|
toggleApp.constant('TOGGLE_API_BASE_URL', 'http://toggle-api.master.localhost');
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme
|
; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme
|
||||||
;
|
;
|
||||||
[subrepo]
|
[subrepo]
|
||||||
remote = ssh://git@github.com/1001Pharmacies/docker-vsftpd-s3
|
remote = ssh://git@github.com/aynicos/docker-vsftpd-s3
|
||||||
branch = master
|
branch = master
|
||||||
commit = 6d5b3310525d8cb1be32f0461a8633aba8641b24
|
commit = 6d5b3310525d8cb1be32f0461a8633aba8641b24
|
||||||
parent = 162fd1a1c05971c62996f6be53522c74559f567b
|
parent = 162fd1a1c05971c62996f6be53522c74559f567b
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
FROM alpine:3.11 as dist
|
FROM alpine:3.11 as dist
|
||||||
LABEL maintainer "yann.autissier@gmail.com"
|
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
|
|
||||||
ARG S3FS_VERSION=v1.85
|
ARG S3FS_VERSION=v1.85
|
||||||
|
|
||||||
|
LABEL maintainer aynic.os <support+docker@asycn.io>
|
||||||
|
|
||||||
# Install s3fs-fuse and sftpserver
|
# Install s3fs-fuse and sftpserver
|
||||||
RUN apk --no-cache upgrade \
|
RUN apk --no-cache upgrade \
|
||||||
&& apk --no-cache add --virtual .build-deps \
|
&& apk --no-cache add --virtual .build-deps \
|
||||||
|
@ -53,17 +53,5 @@ EXPOSE 1022/tcp
|
||||||
EXPOSE 65000/tcp
|
EXPOSE 65000/tcp
|
||||||
VOLUME ["/var/log"]
|
VOLUME ["/var/log"]
|
||||||
|
|
||||||
FROM dist as local
|
FROM dist as master
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM local as debug
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM local as tests
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM tests as preprod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
FROM preprod as prod
|
|
||||||
ARG DOCKER_BUILD_DIR
|
ARG DOCKER_BUILD_DIR
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2017 1001Pharmacies
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
this software and associated documentation files (the "Software"), to deal in
|
this software and associated documentation files (the "Software"), to deal in
|
||||||
the Software without restriction, including without limitation the rights to
|
the Software without restriction, including without limitation the rights to
|
||||||
|
|
|
@ -10,7 +10,7 @@ PASV_MIN_PORT=${PASV_MIN_PORT:-65000}
|
||||||
PASV_MAX_PORT=${PASV_MAX_PORT:-65535}
|
PASV_MAX_PORT=${PASV_MAX_PORT:-65535}
|
||||||
|
|
||||||
# VSFTPD Banner
|
# VSFTPD Banner
|
||||||
FTPD_BANNER=${FTPD_BANNER:-1001Pharmacies FTP Server}
|
FTPD_BANNER=${FTPD_BANNER:-FTP Server}
|
||||||
|
|
||||||
# FTP allowed commands
|
# FTP allowed commands
|
||||||
# full command list : https://blog.vigilcode.com/2011/08/configure-secure-ftp-with-vsftpd/
|
# full command list : https://blog.vigilcode.com/2011/08/configure-secure-ftp-with-vsftpd/
|
||||||
|
@ -39,11 +39,11 @@ pasv_max_port=$PASV_MAX_PORT" > /etc/vsftpd.conf
|
||||||
|
|
||||||
# SSL certificate
|
# SSL certificate
|
||||||
SSL_CERT_C=${SSL_CERT_C:-FR}
|
SSL_CERT_C=${SSL_CERT_C:-FR}
|
||||||
SSL_CERT_ST=${SSL_CERT_ST:-Herault}
|
SSL_CERT_ST=${SSL_CERT_ST:-LaGaule}
|
||||||
SSL_CERT_L=${SSL_CERT_L:-Montpellier}
|
SSL_CERT_L=${SSL_CERT_L:-Mars}
|
||||||
SSL_CERT_O=${SSL_CERT_O:-1001Pharmacies}
|
SSL_CERT_O=${SSL_CERT_O:-1nation}
|
||||||
SSL_CERT_OU=${SSL_CERT_OU:-Hosting}
|
SSL_CERT_OU=${SSL_CERT_OU:-Hosting}
|
||||||
SSL_CERT_CN=${SSL_CERT_CN:-ftp.1001pharmacies.com}
|
SSL_CERT_CN=${SSL_CERT_CN:-ftp}
|
||||||
|
|
||||||
# Create SSL certificate
|
# Create SSL certificate
|
||||||
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -addext extendedKeyUsage=serverAuth -addext subjectAltName=DNS:${SSL_CERT_CN} -subj "/C=${SSL_CERT_C}/ST=${SSL_CERT_ST}/L=${SSL_CERT_L}/O=${SSL_CERT_O}/OU=${SSL_CERT_OU}/CN=${SSL_CERT_CN}" -keyout /etc/ssl/private/vsftpd.pem -out /etc/ssl/private/vsftpd.pem 2>/dev/null && echo "
|
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -addext extendedKeyUsage=serverAuth -addext subjectAltName=DNS:${SSL_CERT_CN} -subj "/C=${SSL_CERT_C}/ST=${SSL_CERT_ST}/L=${SSL_CERT_L}/O=${SSL_CERT_O}/OU=${SSL_CERT_OU}/CN=${SSL_CERT_CN}" -keyout /etc/ssl/private/vsftpd.pem -out /etc/ssl/private/vsftpd.pem 2>/dev/null && echo "
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
##
|
##
|
||||||
# BUILD
|
# BUILD
|
||||||
|
|
||||||
# target build-env: Build .env file in docker SERVICE to deploy
|
# target build-env: Build .env file in docker SERVICE
|
||||||
# on local host
|
# on local host
|
||||||
.PHONY: build-env
|
.PHONY: build-env
|
||||||
build-env: SERVICE ?= $(DOCKER_SERVICE)
|
build-env: SERVICE ?= $(DOCKER_SERVICE)
|
||||||
|
@ -10,9 +10,6 @@ build-env: bootstrap
|
||||||
rm -f .env \
|
rm -f .env \
|
||||||
&& make .env ENV=$(ENV) \
|
&& make .env ENV=$(ENV) \
|
||||||
&& echo BUILD=true >> .env \
|
&& echo BUILD=true >> .env \
|
||||||
&& echo BUILD_DATE='"\'"'$(shell date "+%d/%m/%Y %H:%M:%S %z" 2>/dev/null)'"\'"' >> .env \
|
|
||||||
&& echo BUILD_STATUS='"\'"'$(shell git status -uno --porcelain 2>/dev/null)'"\'"' >> .env \
|
|
||||||
&& echo DOCKER=false >> .env \
|
|
||||||
&& $(foreach var,$(BUILD_ENV_VARS), \
|
&& $(foreach var,$(BUILD_ENV_VARS), \
|
||||||
$(if $($(var)),sed -i '/^$(var)=/d' .env && echo $(var)='$($(var))' >> .env &&) \
|
$(if $($(var)),sed -i '/^$(var)=/d' .env && echo $(var)='$($(var))' >> .env &&) \
|
||||||
) true \
|
) true \
|
||||||
|
@ -24,7 +21,7 @@ build-env: bootstrap
|
||||||
build-init:
|
build-init:
|
||||||
$(RUN) rm -rf build && $(RUN) mkdir -p build
|
$(RUN) rm -rf build && $(RUN) mkdir -p build
|
||||||
|
|
||||||
# target build-shared: Create SHARED folder in docker SERVICE to deploy
|
# target build-shared: Create SHARED folder in docker SERVICE
|
||||||
# on local host
|
# on local host
|
||||||
.PHONY: build-shared
|
.PHONY: build-shared
|
||||||
build-shared: SERVICE ?= $(DOCKER_SERVICE)
|
build-shared: SERVICE ?= $(DOCKER_SERVICE)
|
||||||
|
|
|
@ -29,7 +29,7 @@ bootstrap-git-%:
|
||||||
.PHONY: build
|
.PHONY: build
|
||||||
build: docker-compose-build ## Build application docker images
|
build: docker-compose-build ## Build application docker images
|
||||||
|
|
||||||
# target build@%: Build application docker images to deploy of % ENV
|
# target build@%: Build application docker images of % ENV
|
||||||
# on local host
|
# on local host
|
||||||
.PHONY: build@% app-build
|
.PHONY: build@% app-build
|
||||||
build@%: myos-base
|
build@%: myos-base
|
||||||
|
@ -47,13 +47,12 @@ build@%: myos-base
|
||||||
# target clean: Clean application and docker images
|
# target clean: Clean application and docker images
|
||||||
# on local host
|
# on local host
|
||||||
.PHONY: clean app-clean
|
.PHONY: clean app-clean
|
||||||
clean: app-clean docker-compose-down .env-clean ## Clean application and docker images
|
clean: app-clean docker-rm docker-image-rm docker-volume-rm .env-clean ## Clean application and docker stuffs
|
||||||
|
|
||||||
# target clean@%: Clean deployed application and docker images of % ENV
|
# target clean@%: Clean deployed application and docker images of % ENV
|
||||||
# on local host
|
# on local host
|
||||||
.PHONY: clean@%
|
.PHONY: clean@%
|
||||||
clean@%:
|
clean@%: docker-rm docker-image-rm docker-volume-rm;
|
||||||
$(call make,docker-compose-down DOCKER_COMPOSE_DOWN_OPTIONS='--rmi all -v')
|
|
||||||
|
|
||||||
# target config: View application docker compose file
|
# target config: View application docker compose file
|
||||||
# on local host
|
# on local host
|
||||||
|
|
|
@ -0,0 +1,49 @@
|
||||||
|
BUILD_AUTHOR ?= $(DOCKER_AUTHOR)
|
||||||
|
BUILD_DATE ?= $(shell TZ=UTC date "+%d/%m/%YT%H:%M:%SZ" 2>/dev/null)
|
||||||
|
BUILD_DESCRIPTION ?= Lot of Love
|
||||||
|
BUILD_DOCUMENTATION ?= $(if $(wildcard README.md),$(APP_REPOSITORY)/blob/$(COMMIT)/README.md)
|
||||||
|
BUILD_ENV_VARS ?= APP BRANCH BUILD_DATE BUILD_STATUS COMMIT DEPLOY_HOOK_URL ENV VERSION
|
||||||
|
BUILD_LABEL_VARS ?= org.label-schema.% org.opencontainers.% os.my.%
|
||||||
|
BUILD_LABEL_ARGS ?= $(foreach var,$(filter $(BUILD_LABEL_VARS),$(MAKE_FILE_VARS)),$(if $($(var)),$(var)='$($(var))'))
|
||||||
|
BUILD_LICENSE ?= GPL-3.0
|
||||||
|
BUILD_NAME ?= $(COMPOSE_SERVICE_NAME)-$(BUILD_SERVICE)
|
||||||
|
BUILD_SERVICE ?= undef
|
||||||
|
BUILD_STATUS ?= $(shell git status -uno --porcelain 2>/dev/null)
|
||||||
|
|
||||||
|
org.label-schema.build-date ?= $(BUILD_DATE)
|
||||||
|
org.label-schema.description ?= $(BUILD_DESCRIPTION)
|
||||||
|
org.label-schema.docker.cmd ?= docker run -d $(DOCKER_REGISTRY)/$(DOCKER_REPOSITORY)/$(BUILD_SERVICE):$(DOCKER_IMAGE_TAG)
|
||||||
|
org.label-schema.license ?= GPLv3
|
||||||
|
org.label-schema.name ?= $(BUILD_NAME)
|
||||||
|
org.label-schema.schema-version ?= 1.0
|
||||||
|
org.label-schema.url ?= $(APP_URL)
|
||||||
|
org.label-schema.usage ?= $(BUILD_DOCUMENTATION)
|
||||||
|
org.label-schema.vcs-ref ?= $(COMMIT)
|
||||||
|
org.label-schema.vcs-url ?= $(APP_REPOSITORY)
|
||||||
|
org.label-schema.vendor ?= $(BUILD_AUTHOR)
|
||||||
|
org.label-schema.version ?= $(VERSION)
|
||||||
|
org.opencontainers.image.created ?= $(BUILD_DATE)
|
||||||
|
org.opencontainers.image.revision ?= $(COMMIT)
|
||||||
|
org.opencontainers.image.source ?= $(APP_REPOSITORY)
|
||||||
|
org.opencontainers.image.url ?= $(APP_URL)
|
||||||
|
org.opencontainers.image.vendor ?= $(BUILD_AUTHOR)
|
||||||
|
org.opencontainers.image.version ?= $(VERSION)
|
||||||
|
org.opencontainers.image.url ?= $(APP_URL)
|
||||||
|
org.opencontainers.image.source ?= $(APP_REPOSITORY)
|
||||||
|
org.opencontainers.image.version ?= $(VERSION)
|
||||||
|
org.opencontainers.image.revision ?= $(COMMIT)
|
||||||
|
org.opencontainers.image.vendor ?= $(BUILD_AUTHOR)
|
||||||
|
org.opencontainers.image.title ?= $(BUILD_NAME)
|
||||||
|
org.opencontainers.image.description ?= $(BUILD_DESCRIPTION)
|
||||||
|
org.opencontainers.image.documentation ?= $(BUILD_DOCUMENTATION)
|
||||||
|
org.opencontainers.build_tool.revision ?= $(MYOS_COMMIT)
|
||||||
|
org.opencontainers.build_tool.source ?= $(MYOS_REPOSITORY)
|
||||||
|
org.opencontainers.image.authors ?= $(BUILD_AUTHOR)
|
||||||
|
org.opencontainers.image.licenses ?= $(BUILD_LICENSE)
|
||||||
|
os.my.author ?= $(BUILD_AUTHOR)
|
||||||
|
os.my.date ?= $(BUILD_DATE)
|
||||||
|
os.my.name ?= $(BUILD_NAME)
|
||||||
|
os.my.status ?= $(BUILD_STATUS)
|
||||||
|
os.my.user ?= $(USER)
|
||||||
|
os.my.uid ?= $(UID)
|
||||||
|
os.my.version ?= $(VERSION)
|
|
@ -1,7 +1,7 @@
|
||||||
CMDS += docker-compose-exec docker-run docker-run-%
|
CMDS += docker-compose-exec docker-run docker-run-%
|
||||||
COMPOSE_FILE ?= $(wildcard docker/docker-compose.yml $(foreach file,$(patsubst docker/docker-compose.%,%,$(basename $(wildcard docker/docker-compose.*.yml))),$(if $(filter true,$(COMPOSE_FILE_$(file)) $(COMPOSE_FILE_$(call UPPERCASE,$(file)))),docker/docker-compose.$(file).yml)))
|
COMPOSE_FILE ?= $(wildcard docker/docker-compose.yml $(foreach file,$(patsubst docker/docker-compose.%,%,$(basename $(wildcard docker/docker-compose.*.yml))),$(if $(filter true,$(COMPOSE_FILE_$(file)) $(COMPOSE_FILE_$(call UPPERCASE,$(file)))),docker/docker-compose.$(file).yml)))
|
||||||
COMPOSE_FILE_$(ENV) ?= true
|
COMPOSE_FILE_$(ENV) ?= true
|
||||||
COMPOSE_FILE_DEBUG ?= $(DEBUG)
|
COMPOSE_FILE_DEBUG ?= $(if $(DEBUG),true)
|
||||||
COMPOSE_FILE_NFS ?= $(MOUNT_NFS)
|
COMPOSE_FILE_NFS ?= $(MOUNT_NFS)
|
||||||
COMPOSE_FILE_SSH ?= true
|
COMPOSE_FILE_SSH ?= true
|
||||||
ifneq ($(SUBREPO),)
|
ifneq ($(SUBREPO),)
|
||||||
|
@ -17,15 +17,19 @@ endif
|
||||||
COMPOSE_IGNORE_ORPHANS ?= false
|
COMPOSE_IGNORE_ORPHANS ?= false
|
||||||
COMPOSE_PROJECT_NAME ?= $(USER)_$(ENV)_$(APP)
|
COMPOSE_PROJECT_NAME ?= $(USER)_$(ENV)_$(APP)
|
||||||
COMPOSE_SERVICE_NAME ?= $(subst _,-,$(COMPOSE_PROJECT_NAME))
|
COMPOSE_SERVICE_NAME ?= $(subst _,-,$(COMPOSE_PROJECT_NAME))
|
||||||
CONTEXT += COMPOSE_FILE DOCKER_IMAGE_TAG DOCKER_REPOSITORY
|
CONTEXT += COMPOSE_FILE DOCKER_REPOSITORY
|
||||||
CONTEXT_DEBUG += DOCKER_REGISTRY
|
CONTEXT_DEBUG += DOCKER_BUILD_TARGET DOCKER_IMAGE_TAG DOCKER_REGISTRY DOCKER_SERVICE DOCKER_SERVICES
|
||||||
DOCKER_BUILD_ARGS ?= $(if $(filter $(DOCKER_BUILD_NO_CACHE),true),--pull --no-cache) $(foreach var,$(DOCKER_BUILD_VARS),$(if $($(var)),--build-arg $(var)='$($(var))'))
|
DOCKER_AUTHOR ?= $(DOCKER_AUTHOR_NAME) <$(DOCKER_AUTHOR_EMAIL)>
|
||||||
|
DOCKER_AUTHOR_EMAIL ?= $(subst +git,+docker,$(GIT_AUTHOR_EMAIL))
|
||||||
|
DOCKER_AUTHOR_NAME ?= $(GIT_AUTHOR_NAME)
|
||||||
|
DOCKER_BUILD_ARGS ?= $(if $(filter true,$(DOCKER_BUILD_NO_CACHE)),--pull --no-cache) $(foreach var,$(DOCKER_BUILD_VARS),$(if $($(var)),--build-arg $(var)='$($(var))'))
|
||||||
DOCKER_BUILD_CACHE ?= true
|
DOCKER_BUILD_CACHE ?= true
|
||||||
|
DOCKER_BUILD_LABEL ?= $(foreach var,$(filter $(BUILD_LABEL_VARS),$(MAKE_FILE_VARS)),$(if $($(var)),--label $(var)='$($(var))'))
|
||||||
DOCKER_BUILD_NO_CACHE ?= false
|
DOCKER_BUILD_NO_CACHE ?= false
|
||||||
DOCKER_BUILD_TARGET ?= $(if $(filter $(ENV),$(DOCKER_BUILD_TARGETS)),$(ENV),$(DOCKER_BUILD_TARGET_DEFAULT))
|
DOCKER_BUILD_TARGET ?= $(if $(filter $(ENV),$(DOCKER_BUILD_TARGETS)),$(ENV),$(DOCKER_BUILD_TARGET_DEFAULT))
|
||||||
DOCKER_BUILD_TARGET_DEFAULT ?= local
|
DOCKER_BUILD_TARGET_DEFAULT ?= master
|
||||||
DOCKER_BUILD_TARGETS ?= local debug tests preprod prod
|
DOCKER_BUILD_TARGETS ?= $(ENV_DEPLOY)
|
||||||
DOCKER_BUILD_VARS ?= APP BRANCH DOCKER_GID DOCKER_REPOSITORY GID GIT_AUTHOR_EMAIL GIT_AUTHOR_NAME TARGET UID USER VERSION
|
DOCKER_BUILD_VARS ?= APP BRANCH DOCKER_GID DOCKER_REPOSITORY GID GIT_AUTHOR_EMAIL GIT_AUTHOR_NAME SSH_REMOTE_HOSTS TARGET UID USER VERSION
|
||||||
DOCKER_COMPOSE_DOWN_OPTIONS ?=
|
DOCKER_COMPOSE_DOWN_OPTIONS ?=
|
||||||
DOCKER_COMPOSE_UP_OPTIONS ?= -d
|
DOCKER_COMPOSE_UP_OPTIONS ?= -d
|
||||||
DOCKER_GID ?= $(call gid,docker)
|
DOCKER_GID ?= $(call gid,docker)
|
||||||
|
@ -43,8 +47,8 @@ DOCKER_REGISTRY ?= registry
|
||||||
DOCKER_REGISTRY_USERNAME ?= $(USER)
|
DOCKER_REGISTRY_USERNAME ?= $(USER)
|
||||||
DOCKER_REGISTRY_REPOSITORY ?= $(addsuffix /,$(DOCKER_REGISTRY))$(subst $(USER),$(DOCKER_REGISTRY_USERNAME),$(DOCKER_REPOSITORY))
|
DOCKER_REGISTRY_REPOSITORY ?= $(addsuffix /,$(DOCKER_REGISTRY))$(subst $(USER),$(DOCKER_REGISTRY_USERNAME),$(DOCKER_REPOSITORY))
|
||||||
DOCKER_REPOSITORY ?= $(subst _,/,$(COMPOSE_PROJECT_NAME))
|
DOCKER_REPOSITORY ?= $(subst _,/,$(COMPOSE_PROJECT_NAME))
|
||||||
DOCKER_SERVICE ?= $(shell $(call docker-compose,--log-level critical config --services) |tail -1)
|
DOCKER_SERVICE ?= $(lastword $(DOCKER_SERVICES))
|
||||||
DOCKER_SERVICES ?= $(eval DRYRUN_IGNORE := true) $(shell $(call docker-compose,--log-level critical config --services)) $(eval DRYRUN_IGNORE := false)
|
DOCKER_SERVICES ?= $(eval IGNORE_DRYRUN := true)$(eval IGNORE_VERBOSE := true)$(shell $(call docker-compose,--log-level critical config --services))$(eval IGNORE_DRYRUN := false)$(eval IGNORE_VERBOSE := false)
|
||||||
DOCKER_SHELL ?= $(SHELL)
|
DOCKER_SHELL ?= $(SHELL)
|
||||||
ENV_VARS += COMPOSE_PROJECT_NAME COMPOSE_SERVICE_NAME DOCKER_BUILD_TARGET DOCKER_GID DOCKER_IMAGE_TAG DOCKER_REGISTRY DOCKER_REPOSITORY DOCKER_SHELL
|
ENV_VARS += COMPOSE_PROJECT_NAME COMPOSE_SERVICE_NAME DOCKER_BUILD_TARGET DOCKER_GID DOCKER_IMAGE_TAG DOCKER_REGISTRY DOCKER_REPOSITORY DOCKER_SHELL
|
||||||
|
|
||||||
|
@ -105,8 +109,8 @@ define docker-build
|
||||||
$(eval tag := $(or $(2),$(DOCKER_REPOSITORY)/$(lastword $(subst /, ,$(path))):$(DOCKER_IMAGE_TAG)))
|
$(eval tag := $(or $(2),$(DOCKER_REPOSITORY)/$(lastword $(subst /, ,$(path))):$(DOCKER_IMAGE_TAG)))
|
||||||
$(eval target := $(subst ",,$(subst ',,$(or $(3),$(DOCKER_BUILD_TARGET)))))
|
$(eval target := $(subst ",,$(subst ',,$(or $(3),$(DOCKER_BUILD_TARGET)))))
|
||||||
$(eval image_id := $(shell docker images -q $(tag) 2>/dev/null))
|
$(eval image_id := $(shell docker images -q $(tag) 2>/dev/null))
|
||||||
$(eval build_image := $(or $(filter $(DOCKER_BUILD_CACHE),false),$(if $(image_id),,true)))
|
$(eval build_image := $(or $(filter false,$(DOCKER_BUILD_CACHE)),$(if $(image_id),,true)))
|
||||||
$(if $(build_image),$(RUN) docker build $(DOCKER_BUILD_ARGS) --build-arg DOCKER_BUILD_DIR="$(path)" --tag $(tag) $(if $(target),--target $(target)) -f $(path)/Dockerfile .,$(if $(VERBOSE),echo "docker image $(tag) has id $(image_id)",true))
|
$(if $(build_image),$(RUN) docker build $(DOCKER_BUILD_ARGS) --build-arg DOCKER_BUILD_DIR="$(path)" $(DOCKER_BUILD_LABEL) --tag $(tag) $(if $(target),--target $(target)) -f $(path)/Dockerfile .,$(if $(VERBOSE),echo "docker image $(tag) has id $(image_id)",true))
|
||||||
endef
|
endef
|
||||||
# function docker-commit: Commit docker image
|
# function docker-commit: Commit docker image
|
||||||
define docker-commit
|
define docker-commit
|
||||||
|
@ -153,6 +157,7 @@ define docker-stack-update
|
||||||
$(eval version := $(or $(2),$(if $(findstring :,$(stack)),$(lastword $(subst :, ,$(stack))),latest)))
|
$(eval version := $(or $(2),$(if $(findstring :,$(stack)),$(lastword $(subst :, ,$(stack))),latest)))
|
||||||
$(eval path := $(patsubst %/,%,$(or $(3),$(if $(findstring /,$(1)),$(if $(wildcard stack/$(1) stack/$(1).yml),stack/$(if $(findstring .yml,$(1)),$(dir $(1)),$(if $(wildcard stack/$(1).yml),$(dir $(1)),$(1))),$(dir $(1)))),stack/$(name))))
|
$(eval path := $(patsubst %/,%,$(or $(3),$(if $(findstring /,$(1)),$(if $(wildcard stack/$(1) stack/$(1).yml),stack/$(if $(findstring .yml,$(1)),$(dir $(1)),$(if $(wildcard stack/$(1).yml),$(dir $(1)),$(1))),$(dir $(1)))),stack/$(name))))
|
||||||
$(eval COMPOSE_FILE += $(wildcard $(path)/$(name).yml $(path)/$(name).$(ENV).yml $(path)/$(name).$(ENV).$(version).yml $(path)/$(name).$(version).yml))
|
$(eval COMPOSE_FILE += $(wildcard $(path)/$(name).yml $(path)/$(name).$(ENV).yml $(path)/$(name).$(ENV).$(version).yml $(path)/$(name).$(version).yml))
|
||||||
|
$(eval COMPOSE_FILE := $(strip $(COMPOSE_FILE)))
|
||||||
$(if $(wildcard $(path)/.env.dist),$(call .env,,$(path)/.env.dist,$(wildcard $(CONFIG)/$(ENV)/$(APP)/.env $(path)/.env.$(ENV) .env)))
|
$(if $(wildcard $(path)/.env.dist),$(call .env,,$(path)/.env.dist,$(wildcard $(CONFIG)/$(ENV)/$(APP)/.env $(path)/.env.$(ENV) .env)))
|
||||||
endef
|
endef
|
||||||
# function docker-tag: Tag docker image
|
# function docker-tag: Tag docker image
|
||||||
|
|
|
@ -11,9 +11,8 @@ APP_SCHEME ?= https
|
||||||
APP_UPSTREAM_REPOSITORY ?= $(or $(shell git config --get remote.upstream.url 2>/dev/null),$(GIT_UPSTREAM_REPOSITORY))
|
APP_UPSTREAM_REPOSITORY ?= $(or $(shell git config --get remote.upstream.url 2>/dev/null),$(GIT_UPSTREAM_REPOSITORY))
|
||||||
APP_URI ?= $(APP_HOST)$(APP_PATH)
|
APP_URI ?= $(APP_HOST)$(APP_PATH)
|
||||||
APP_URL ?= $(APP_SCHEME)://$(APP_URI)
|
APP_URL ?= $(APP_SCHEME)://$(APP_URI)
|
||||||
BUILD_ENV_VARS ?= APP BRANCH COMMIT DEPLOY_HOOK_URL ENV VERSION
|
CONTEXT_DEBUG += APP_DIR APP_DOMAIN APP_HOST APP_PATH APP_URL APP_REPOSITORY APP_UPSTREAM_REPOSITORY ENV_DEPLOY
|
||||||
CONTEXT_DEBUG += APP_DIR APP_DOMAIN APP_HOST APP_PATH APP_URL APP_REPOSITORY APP_UPSTREAM_REPOSITORY
|
ENV_DEPLOY ?= $(shell ls .git/refs/remotes/origin/ 2>/dev/null)
|
||||||
ENV_DEPLOY ?= $(shell ls .git/refs/heads/)
|
|
||||||
ENV_VARS += APP_DIR APP_DOMAIN APP_HOST APP_PATH APP_URL CONSUL_HTTP_TOKEN $(if $(filter true,$(MOUNT_NFS)),NFS_CONFIG)
|
ENV_VARS += APP_DIR APP_DOMAIN APP_HOST APP_PATH APP_URL CONSUL_HTTP_TOKEN $(if $(filter true,$(MOUNT_NFS)),NFS_CONFIG)
|
||||||
MOUNT_NFS ?= false
|
MOUNT_NFS ?= false
|
||||||
NFS_CONFIG ?= addr=$(NFS_HOST),actimeo=3,intr,noacl,noatime,nocto,nodiratime,nolock,soft,rsize=32768,wsize=32768,tcp,rw,vers=3
|
NFS_CONFIG ?= addr=$(NFS_HOST),actimeo=3,intr,noacl,noatime,nocto,nodiratime,nolock,soft,rsize=32768,wsize=32768,tcp,rw,vers=3
|
||||||
|
|
|
@ -120,7 +120,7 @@ docker-images-rm:
|
||||||
# target docker-images-rm-%: Remove docker images matching %
|
# target docker-images-rm-%: Remove docker images matching %
|
||||||
.PHONY: docker-images-rm-%
|
.PHONY: docker-images-rm-%
|
||||||
docker-images-rm-%:
|
docker-images-rm-%:
|
||||||
docker images |awk '$$1 ~ /^$(subst /,\/,$*)/ {print $$3}' |sort -u |while read image; do docker rmi -f $$image; done
|
docker images |awk '$$1 ~ /^$(subst /,\/,$*)/ {print $$3}' |sort -u |while read image; do $(RUN) docker rmi -f $$image; done
|
||||||
|
|
||||||
# target docker-login: Exec 'docker login'
|
# target docker-login: Exec 'docker login'
|
||||||
.PHONY: docker-login
|
.PHONY: docker-login
|
||||||
|
@ -188,7 +188,7 @@ docker-rm: docker-rm-$(COMPOSE_PROJECT_NAME)
|
||||||
# target docker-rm-%: Remove dockers matching %
|
# target docker-rm-%: Remove dockers matching %
|
||||||
.PHONY: docker-rm-%
|
.PHONY: docker-rm-%
|
||||||
docker-rm-%:
|
docker-rm-%:
|
||||||
docker ps -a |awk '$$NF ~ /^$*/ {print $$NF}' |while read docker; do docker rm -f $$docker; done
|
docker ps -a |awk '$$NF ~ /^$*/ {print $$NF}' |while read docker; do $(RUN) docker rm -f $$docker; done
|
||||||
|
|
||||||
# target docker-run: Call docker-run-% target with ARGS for SERVICE
|
# target docker-run: Call docker-run-% target with ARGS for SERVICE
|
||||||
.PHONY: docker-run
|
.PHONY: docker-run
|
||||||
|
@ -230,4 +230,4 @@ docker-volume-rm: docker-volume-rm-$(COMPOSE_PROJECT_NAME)
|
||||||
# target docker-volume-rm-%: Remove docker volumes matching %
|
# target docker-volume-rm-%: Remove docker volumes matching %
|
||||||
.PHONY: docker-volume-rm-%
|
.PHONY: docker-volume-rm-%
|
||||||
docker-volume-rm-%:
|
docker-volume-rm-%:
|
||||||
docker volume ls |awk '$$2 ~ /^$*/ {print $$2}' |sort -u |while read volume; do docker volume rm $$volume; done
|
docker volume ls |awk '$$2 ~ /^$*/ {print $$2}' |sort -u |while read volume; do $(RUN) docker volume rm $$volume; done
|
||||||
|
|
|
@ -37,9 +37,9 @@ git-stash: myos-base git-status
|
||||||
# target git-status: Define STATUS with number of lines of git status
|
# target git-status: Define STATUS with number of lines of git status
|
||||||
.PHONY: git-status
|
.PHONY: git-status
|
||||||
git-status: myos-base
|
git-status: myos-base
|
||||||
$(eval DRYRUN_IGNORE := true)
|
$(eval IGNORE_DRYRUN := true)
|
||||||
$(eval STATUS := $(shell $(call exec,git status -uno --porcelain 2>/dev/null |wc -l)))
|
$(eval STATUS := $(shell $(call exec,git status -uno --porcelain 2>/dev/null |wc -l)))
|
||||||
$(eval DRYRUN_IGNORE := false)
|
$(eval IGNORE_DRYRUN := false)
|
||||||
|
|
||||||
# target git-tag-create-upstream-%: Create git TAG to reference upstream/% branch
|
# target git-tag-create-upstream-%: Create git TAG to reference upstream/% branch
|
||||||
.PHONY: git-tag-create-upstream-%
|
.PHONY: git-tag-create-upstream-%
|
||||||
|
|
|
@ -46,7 +46,7 @@ update-config: myos-base
|
||||||
## it reads .env files to extract applications hostnames and add it to /etc/hosts
|
## it reads .env files to extract applications hostnames and add it to /etc/hosts
|
||||||
.PHONY: update-hosts
|
.PHONY: update-hosts
|
||||||
update-hosts:
|
update-hosts:
|
||||||
ifneq (,$(filter $(ENV),local))
|
ifneq (,$(filter $(ENV),master))
|
||||||
cat */.env 2>/dev/null |grep -Eo 'urlprefix-[^/]+' |sed 's/urlprefix-//' |while read host; do grep $$host /etc/hosts >/dev/null 2>&1 || { echo "Adding $$host to /etc/hosts"; echo 127.0.0.1 $$host |$(RUN) sudo tee -a /etc/hosts >/dev/null; }; done
|
cat */.env 2>/dev/null |grep -Eo 'urlprefix-[^/]+' |sed 's/urlprefix-//' |while read host; do grep $$host /etc/hosts >/dev/null 2>&1 || { echo "Adding $$host to /etc/hosts"; echo 127.0.0.1 $$host |$(RUN) sudo tee -a /etc/hosts >/dev/null; }; done
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,13 @@
|
||||||
# target debug: Print more informations
|
# target debug: Print more informations
|
||||||
.PHONY: debug
|
.PHONY: debug
|
||||||
debug:
|
debug:
|
||||||
$(MAKE) doc help DEBUG=true
|
$(MAKE) doc help profile DEBUG=true
|
||||||
|
|
||||||
# target debug-%: Print value of %
|
# target debug-%: Print value of %
|
||||||
.PHONY: debug-%
|
.PHONY: debug-%
|
||||||
debug-%: context-% ;
|
debug-%: context-% ;
|
||||||
|
|
||||||
|
# target profile: Print timing informations
|
||||||
|
.PHONY: profile
|
||||||
|
profile: context-ELAPSED_TIME
|
||||||
|
|
||||||
|
|
37
make/def.mk
37
make/def.mk
|
@ -14,31 +14,33 @@ CMDS ?= exec exec:% exec@% install-app install-apps r
|
||||||
COMMIT ?= $(or $(SUBREPO_COMMIT),$(GIT_COMMIT))
|
COMMIT ?= $(or $(SUBREPO_COMMIT),$(GIT_COMMIT))
|
||||||
CONFIG ?= $(RELATIVE)config
|
CONFIG ?= $(RELATIVE)config
|
||||||
CONFIG_REPOSITORY ?= $(call pop,$(or $(APP_UPSTREAM_REPOSITORY),$(GIT_UPSTREAM_REPOSITORY)))/$(notdir $(CONFIG))
|
CONFIG_REPOSITORY ?= $(call pop,$(or $(APP_UPSTREAM_REPOSITORY),$(GIT_UPSTREAM_REPOSITORY)))/$(notdir $(CONFIG))
|
||||||
CONTEXT ?= $(if $(APP),APP BRANCH VERSION) $(shell awk 'BEGIN {FS="="}; $$1 !~ /^(\#|$$)/ {print $$1}' .env.dist 2>/dev/null)
|
CONTEXT ?= $(if $(APP),APP BRANCH DOMAIN VERSION) $(shell awk 'BEGIN {FS="="}; $$1 !~ /^(\#|$$)/ {print $$1}' .env.dist 2>/dev/null)
|
||||||
CONTEXT_DEBUG ?= MAKEFILE_LIST env env.docker APPS GIT_AUTHOR_EMAIL GIT_AUTHOR_NAME LOG_LEVEL MAKE_DIR MAKE_SUBDIRS MAKE_CMD_ARGS MAKE_ENV_ARGS MONOREPO_DIR UID USER
|
CONTEXT_DEBUG ?= MAKEFILE_LIST env env.docker APPS GIT_AUTHOR_EMAIL GIT_AUTHOR_NAME LOG_LEVEL MAKE_DIR MAKE_SUBDIRS MAKE_CMD_ARGS MAKE_ENV_ARGS MONOREPO_DIR UID USER
|
||||||
DEBUG ?=
|
DEBUG ?=
|
||||||
DOCKER ?= true
|
DOCKER ?= $(if $(BUILD),false,true)
|
||||||
DOMAIN ?= localhost
|
DOMAIN ?= localhost
|
||||||
DRONE ?= false
|
DRONE ?= false
|
||||||
DRYRUN ?= false
|
DRYRUN ?= false
|
||||||
DRYRUN_IGNORE ?= false
|
|
||||||
DRYRUN_RECURSIVE ?= false
|
DRYRUN_RECURSIVE ?= false
|
||||||
ENV ?= dist
|
ELAPSED_TIME = $(shell $(call TIME))
|
||||||
|
ENV ?= local
|
||||||
ENV_FILE ?= $(wildcard $(CONFIG)/$(ENV)/$(APP)/.env .env)
|
ENV_FILE ?= $(wildcard $(CONFIG)/$(ENV)/$(APP)/.env .env)
|
||||||
ENV_LIST ?= debug local tests release master #TODO: staging develop
|
ENV_LIST ?= $(shell ls .git/refs/heads/ 2>/dev/null)
|
||||||
ENV_RESET ?= false
|
ENV_RESET ?= false
|
||||||
ENV_VARS ?= APP BRANCH ENV HOSTNAME GID GIT_AUTHOR_EMAIL GIT_AUTHOR_NAME MONOREPO MONOREPO_DIR TAG UID USER VERSION
|
ENV_VARS ?= APP BRANCH DOMAIN ENV HOSTNAME GID GIT_AUTHOR_EMAIL GIT_AUTHOR_NAME MONOREPO MONOREPO_DIR TAG UID USER VERSION
|
||||||
GID ?= $(shell id -g 2>/dev/null)
|
GID ?= $(shell id -g 2>/dev/null)
|
||||||
GIT_AUTHOR_EMAIL ?= $(shell git config user.email 2>/dev/null)
|
GIT_AUTHOR_EMAIL ?= $(or $(shell git config user.email 2>/dev/null),$(USER)@my.os)
|
||||||
GIT_AUTHOR_NAME ?= $(shell git config user.name 2>/dev/null)
|
GIT_AUTHOR_NAME ?= $(or $(shell git config user.name 2>/dev/null),$(USER))
|
||||||
GIT_BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD 2>/dev/null)
|
GIT_BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD 2>/dev/null)
|
||||||
GIT_COMMIT ?= $(shell git rev-parse $(BRANCH) 2>/dev/null)
|
GIT_COMMIT ?= $(shell git rev-parse $(BRANCH) 2>/dev/null)
|
||||||
GIT_REPOSITORY ?= $(if $(SUBREPO),$(shell awk -F ' = ' '$$1 ~ /^[[\s\t]]*remote$$/ {print $$2}' .gitrepo 2>/dev/null),$(shell git config --get remote.origin.url 2>/dev/null))
|
GIT_REPOSITORY ?= $(if $(SUBREPO),$(shell awk -F ' = ' '$$1 ~ /^[[\s\t]]*remote$$/ {print $$2}' .gitrepo 2>/dev/null),$(shell git config --get remote.origin.url 2>/dev/null))
|
||||||
GIT_TAG ?= $(shell git tag -l --points-at $(BRANCH) 2>/dev/null)
|
GIT_TAG ?= $(shell git tag -l --points-at $(BRANCH) 2>/dev/null)
|
||||||
GIT_UPSTREAM_REPOSITORY ?= $(if $(findstring ://,$(GIT_REPOSITORY)),$(call pop,$(call pop,$(GIT_REPOSITORY)))/,$(call pop,$(GIT_REPOSITORY),:):)$(GIT_UPSTREAM_USER)/$(lastword $(subst /, ,$(GIT_REPOSITORY)))
|
GIT_UPSTREAM_REPOSITORY ?= $(if $(findstring ://,$(GIT_REPOSITORY)),$(call pop,$(call pop,$(GIT_REPOSITORY)))/,$(call pop,$(GIT_REPOSITORY),:):)$(GIT_UPSTREAM_USER)/$(lastword $(subst /, ,$(GIT_REPOSITORY)))
|
||||||
GIT_UPSTREAM_USER ?= $(or $(MONOREPO),$(USER))
|
GIT_UPSTREAM_USER ?= $(lastword $(subst /, ,$(call pop,$(MYOS_REPOSITORY))))
|
||||||
GIT_VERSION ?= $(shell git describe --tags $(BRANCH) 2>/dev/null || git rev-parse $(BRANCH) 2>/dev/null)
|
GIT_VERSION ?= $(shell git describe --tags $(BRANCH) 2>/dev/null || git rev-parse $(BRANCH) 2>/dev/null)
|
||||||
HOSTNAME ?= $(shell hostname 2>/dev/null |sed 's/\..*//')
|
HOSTNAME ?= $(shell hostname 2>/dev/null |sed 's/\..*//')
|
||||||
|
IGNORE_DRYRUN ?= false
|
||||||
|
IGNORE_VERBOSE ?= $(IGNORE_DRYRUN)
|
||||||
LOG_LEVEL ?= $(if $(DEBUG),debug,$(if $(VERBOSE),info,error))
|
LOG_LEVEL ?= $(if $(DEBUG),debug,$(if $(VERBOSE),info,error))
|
||||||
MAKE_ARGS ?= $(foreach var,$(MAKE_VARS),$(if $($(var)),$(var)='$($(var))'))
|
MAKE_ARGS ?= $(foreach var,$(MAKE_VARS),$(if $($(var)),$(var)='$($(var))'))
|
||||||
MAKE_SUBDIRS ?= $(if $(filter myos,$(MYOS)),monorepo,$(if $(APP),apps $(foreach type,$(APP_TYPE),$(if $(wildcard $(MAKE_DIR)/apps/$(type)),apps/$(type)))))
|
MAKE_SUBDIRS ?= $(if $(filter myos,$(MYOS)),monorepo,$(if $(APP),apps $(foreach type,$(APP_TYPE),$(if $(wildcard $(MAKE_DIR)/apps/$(type)),apps/$(type)))))
|
||||||
|
@ -50,11 +52,14 @@ MAKE_FILE_ARGS ?= $(foreach var,$(filter $(ENV_VARS),$(MAKE_FIL
|
||||||
MAKE_FILE_VARS ?= $(strip $(foreach var, $(filter-out .VARIABLES,$(.VARIABLES)), $(if $(filter file,$(origin $(var))),$(var))))
|
MAKE_FILE_VARS ?= $(strip $(foreach var, $(filter-out .VARIABLES,$(.VARIABLES)), $(if $(filter file,$(origin $(var))),$(var))))
|
||||||
MAKE_OLDFILE ?= $@
|
MAKE_OLDFILE ?= $@
|
||||||
MAKE_TARGETS ?= $(filter-out $(.VARIABLES),$(shell $(MAKE) -qp 2>/dev/null |awk -F':' '/^[a-zA-Z0-9][^$$\#\/\t=]*:([^=]|$$)/ {print $$1}' |sort -u))
|
MAKE_TARGETS ?= $(filter-out $(.VARIABLES),$(shell $(MAKE) -qp 2>/dev/null |awk -F':' '/^[a-zA-Z0-9][^$$\#\/\t=]*:([^=]|$$)/ {print $$1}' |sort -u))
|
||||||
MAKE_UNIXTIME ?= $(shell date +%s 2>/dev/null)
|
MAKE_UNIXTIME_START := $(shell date -u +'%s' 2>/dev/null)
|
||||||
|
MAKE_UNIXTIME_CURRENT = $(shell date -u "+%s" 2>/dev/null)
|
||||||
MAKE_VARS ?= ENV
|
MAKE_VARS ?= ENV
|
||||||
MONOREPO ?= $(if $(filter myos,$(MYOS)),$(notdir $(CURDIR)),$(if $(APP),$(notdir $(realpath $(CURDIR)/..))))
|
MONOREPO ?= $(if $(filter myos,$(MYOS)),$(notdir $(CURDIR)),$(if $(APP),$(notdir $(realpath $(CURDIR)/..))))
|
||||||
MONOREPO_DIR ?= $(if $(MONOREPO),$(if $(filter myos,$(MYOS)),$(realpath $(CURDIR)),$(if $(APP),$(realpath $(CURDIR)/..))))
|
MONOREPO_DIR ?= $(if $(MONOREPO),$(if $(filter myos,$(MYOS)),$(realpath $(CURDIR)),$(if $(APP),$(realpath $(CURDIR)/..))))
|
||||||
MYOS ?= $(if $(filter $(MAKE_DIR),$(call pop,$(MAKE_DIR))),.,$(call pop,$(MAKE_DIR)))
|
MYOS ?= $(if $(filter $(MAKE_DIR),$(call pop,$(MAKE_DIR))),.,$(call pop,$(MAKE_DIR)))
|
||||||
|
MYOS_COMMIT ?= $(shell GIT_DIR=$(MYOS)/.git git rev-parse head 2>/dev/null)
|
||||||
|
MYOS_REPOSITORY ?= $(shell GIT_DIR=$(MYOS)/.git git config --get remote.origin.url 2>/dev/null)
|
||||||
QUIET ?= $(if $(VERBOSE),,--quiet)
|
QUIET ?= $(if $(VERBOSE),,--quiet)
|
||||||
RECURSIVE ?= true
|
RECURSIVE ?= true
|
||||||
RELATIVE ?= $(if $(filter myos,$(MYOS)),./,../)
|
RELATIVE ?= $(if $(filter myos,$(MYOS)),./,../)
|
||||||
|
@ -80,7 +85,7 @@ else
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(DRYRUN),true)
|
ifeq ($(DRYRUN),true)
|
||||||
RUN = $(if $(filter $(DRYRUN_IGNORE),true),,echo)
|
RUN = $(if $(filter-out true,$(IGNORE_DRYRUN)),echo)
|
||||||
ifeq ($(RECURSIVE), true)
|
ifeq ($(RECURSIVE), true)
|
||||||
DRYRUN_RECURSIVE := true
|
DRYRUN_RECURSIVE := true
|
||||||
endif
|
endif
|
||||||
|
@ -147,8 +152,8 @@ force = $$(while true; do [ $$(ps x |awk 'BEGIN {nargs=split("'"$$*"'",args)} $$
|
||||||
# macro gid: Return GID of group 1
|
# macro gid: Return GID of group 1
|
||||||
gid = $(shell grep '^$(1):' /etc/group 2>/dev/null |awk -F: '{print $$3}')
|
gid = $(shell grep '^$(1):' /etc/group 2>/dev/null |awk -F: '{print $$3}')
|
||||||
|
|
||||||
# function INFO: customized info
|
# macro INFO: customized info
|
||||||
INFO = $(if $(VERBOSE),printf '${COLOR_BROWN}$(APP)${COLOR_RESET}[${COLOR_GREEN}$(MAKELEVEL)${COLOR_RESET}] ${COLOR_BLUE}$@${COLOR_RESET}:${COLOR_RESET} ${COLOR_GREEN}Called${COLOR_RESET} $(1)$(if $(2),$(lbracket)$(2)$(rbracket)) $(if $(3),${COLOR_BLUE}in folder${COLOR_RESET} $(3) )\n' >&2)
|
INFO = $(if $(VERBOSE),$(if $(filter-out true,$(IGNORE_VERBOSE)),printf '${COLOR_BROWN}$(APP)${COLOR_RESET}[${COLOR_GREEN}$(MAKELEVEL)${COLOR_RESET}] ${COLOR_BLUE}$@${COLOR_RESET}:${COLOR_RESET} ${COLOR_GREEN}Calling${COLOR_RESET} $(1)$(if $(2),$(lbracket)$(2)$(rbracket)) $(if $(3),${COLOR_BLUE}in folder${COLOR_RESET} $(3) )\n' >&2))
|
||||||
|
|
||||||
# function install-app: Exec 'git clone url 1 dir 2' or Call update-app with url 1 dir 2
|
# function install-app: Exec 'git clone url 1 dir 2' or Call update-app with url 1 dir 2
|
||||||
define install-app
|
define install-app
|
||||||
|
@ -184,7 +189,7 @@ define make
|
||||||
$(eval MAKE_OLDFILE += $(filter-out $(MAKE_OLDFILE), $^))
|
$(eval MAKE_OLDFILE += $(filter-out $(MAKE_OLDFILE), $^))
|
||||||
$(call INFO,make,$(MAKE_ARGS) $(cmd),$(dir))
|
$(call INFO,make,$(MAKE_ARGS) $(cmd),$(dir))
|
||||||
$(RUN) $(MAKE) $(MAKE_DIR) $(patsubst %,-o %,$(MAKE_OLDFILE)) MAKE_OLDFILE="$(MAKE_OLDFILE)" $(MAKE_ARGS) $(cmd)
|
$(RUN) $(MAKE) $(MAKE_DIR) $(patsubst %,-o %,$(MAKE_OLDFILE)) MAKE_OLDFILE="$(MAKE_OLDFILE)" $(MAKE_ARGS) $(cmd)
|
||||||
$(if $(filter $(DRYRUN_RECURSIVE),true),$(MAKE) $(MAKE_DIR) $(patsubst %,-o %,$(MAKE_OLDFILE)) MAKE_OLDFILE="$(MAKE_OLDFILE)" DRYRUN=$(DRYRUN) RECURSIVE=$(RECURSIVE) $(MAKE_ARGS) $(cmd))
|
$(if $(filter true,$(DRYRUN_RECURSIVE)),$(MAKE) $(MAKE_DIR) $(patsubst %,-o %,$(MAKE_OLDFILE)) MAKE_OLDFILE="$(MAKE_OLDFILE)" DRYRUN=$(DRYRUN) RECURSIVE=$(RECURSIVE) $(MAKE_ARGS) $(cmd))
|
||||||
endef
|
endef
|
||||||
|
|
||||||
# macro pop: Return last word of string 1 according to separator 2
|
# macro pop: Return last word of string 1 according to separator 2
|
||||||
|
@ -193,6 +198,10 @@ pop = $(patsubst %$(or $(2),/)$(lastword $(subst $(or $(2),/), ,$(1))),%,$(1))
|
||||||
# macro sed: Exec sed script 1 on file 2
|
# macro sed: Exec sed script 1 on file 2
|
||||||
sed = $(call exec,sed -i $(SED_SUFFIX) '\''$(1)'\'' $(2))
|
sed = $(call exec,sed -i $(SED_SUFFIX) '\''$(1)'\'' $(2))
|
||||||
|
|
||||||
|
# macro TIME: Print time elapsed since unixtime 1
|
||||||
|
TIME = awk '{printf "%02d:%02d:%02d\n",int($$1/3600),int(($$1%3600)/60),int($$1%60)}' \
|
||||||
|
<<< $(shell bc <<< "$(or $(2),$(MAKE_UNIXTIME_CURRENT))-$(or $(1),$(MAKE_UNIXTIME_START))" 2>/dev/null)
|
||||||
|
|
||||||
# function update-app: Exec 'cd dir 1 && git pull' or Call install-app
|
# function update-app: Exec 'cd dir 1 && git pull' or Call install-app
|
||||||
define update-app
|
define update-app
|
||||||
$(call INFO,update-app,$(1)$(comma) $(2))
|
$(call INFO,update-app,$(1)$(comma) $(2))
|
||||||
|
|
|
@ -21,7 +21,7 @@ context:
|
||||||
|
|
||||||
# target context: Fire context-% target for each CONTEXT
|
# target context: Fire context-% target for each CONTEXT
|
||||||
.PHONY: contexts
|
.PHONY: contexts
|
||||||
contexts: $(foreach var,$(CONTEXT),$(if $($(var)),context-$(var)))
|
contexts: $(foreach var,$(CONTEXT),context-$(var))
|
||||||
|
|
||||||
# target context-%: Print % value
|
# target context-%: Print % value
|
||||||
.PHONY: context-%
|
.PHONY: context-%
|
||||||
|
|
|
@ -26,9 +26,9 @@ endif
|
||||||
## it compares child commit with our tree : git diff --quiet child -- subrepo
|
## it compares child commit with our tree : git diff --quiet child -- subrepo
|
||||||
.PHONY: subrepo-git-diff
|
.PHONY: subrepo-git-diff
|
||||||
subrepo-git-diff: myos-base subrepo-check
|
subrepo-git-diff: myos-base subrepo-check
|
||||||
$(eval DRYRUN_IGNORE := true)
|
$(eval IGNORE_DRYRUN := true)
|
||||||
$(eval DIFF = $(shell $(call exec,git diff --quiet $(shell $(call exec,git rev-list --ancestry-path $(shell awk '$$1 == "parent" {print $$3}' $(SUBREPO)/.gitrepo)..HEAD |tail -n 1)) -- $(SUBREPO); echo $$?)) )
|
$(eval DIFF = $(shell $(call exec,git diff --quiet $(shell $(call exec,git rev-list --ancestry-path $(shell awk '$$1 == "parent" {print $$3}' $(SUBREPO)/.gitrepo)..HEAD |tail -n 1)) -- $(SUBREPO); echo $$?)) )
|
||||||
$(eval DRYRUN_IGNORE := false)
|
$(eval IGNORE_DRYRUN := false)
|
||||||
|
|
||||||
# target subrepo-git-fetch: Fetch git remote
|
# target subrepo-git-fetch: Fetch git remote
|
||||||
.PHONY: subrepo-git-fetch
|
.PHONY: subrepo-git-fetch
|
||||||
|
@ -52,9 +52,9 @@ ifeq ($(BRANCH),master)
|
||||||
endif
|
endif
|
||||||
# if release|story|hotfix branch, delete remote branch before push and recreate it from master
|
# if release|story|hotfix branch, delete remote branch before push and recreate it from master
|
||||||
ifneq ($(findstring $(firstword $(subst /, ,$(BRANCH))),release story hotfix),)
|
ifneq ($(findstring $(firstword $(subst /, ,$(BRANCH))),release story hotfix),)
|
||||||
$(eval DRYRUN_IGNORE := true)
|
$(eval IGNORE_DRYRUN := true)
|
||||||
$(eval DELETE = $(shell $(call exec,git ls-remote --heads $(REMOTE) $(BRANCH) |wc -l)) )
|
$(eval DELETE = $(shell $(call exec,git ls-remote --heads $(REMOTE) $(BRANCH) |wc -l)) )
|
||||||
$(eval DRYRUN_IGNORE := false)
|
$(eval IGNORE_DRYRUN := false)
|
||||||
else
|
else
|
||||||
$(eval DELETE = 0)
|
$(eval DELETE = 0)
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -10,7 +10,9 @@ ssh-add: base-ssh-add
|
||||||
.PHONY: base-ssh-add
|
.PHONY: base-ssh-add
|
||||||
base-ssh-add: base-ssh-key
|
base-ssh-add: base-ssh-key
|
||||||
$(eval SSH_PRIVATE_KEYS := $(foreach file,$(SSH_DIR)/id_rsa $(filter-out $(wildcard $(SSH_DIR)/id_rsa),$(wildcard $(SSH_DIR)/*)),$(if $(shell grep "PRIVATE KEY" $(file) 2>/dev/null),$(notdir $(file)))))
|
$(eval SSH_PRIVATE_KEYS := $(foreach file,$(SSH_DIR)/id_rsa $(filter-out $(wildcard $(SSH_DIR)/id_rsa),$(wildcard $(SSH_DIR)/*)),$(if $(shell grep "PRIVATE KEY" $(file) 2>/dev/null),$(notdir $(file)))))
|
||||||
|
$(eval IGNORE_VERBOSE := true)
|
||||||
$(call docker-run,$(DOCKER_IMAGE_CLI),sh -c "$(foreach file,$(patsubst %,$(SSH_DIR)/%,$(SSH_PRIVATE_KEYS)),ssh-add -l |grep -qw $$(ssh-keygen -lf $(file) 2>/dev/null |awk '{print $$2}') 2>/dev/null || ssh-add $(file) ||: &&) true")
|
$(call docker-run,$(DOCKER_IMAGE_CLI),sh -c "$(foreach file,$(patsubst %,$(SSH_DIR)/%,$(SSH_PRIVATE_KEYS)),ssh-add -l |grep -qw $$(ssh-keygen -lf $(file) 2>/dev/null |awk '{print $$2}') 2>/dev/null || ssh-add $(file) ||: &&) true")
|
||||||
|
$(eval IGNORE_VERBOSE := false)
|
||||||
|
|
||||||
# target base-ssh-key: Setup ssh private key SSH_KEY in SSH_DIR
|
# target base-ssh-key: Setup ssh private key SSH_KEY in SSH_DIR
|
||||||
.PHONY: base-ssh-key
|
.PHONY: base-ssh-key
|
||||||
|
|
Loading…
Reference in New Issue