🎉 First commit, from couchbase generator, basic changes
not tested / updated yet
This commit is contained in:
10
{{cookiecutter.project_slug}}/scripts/build-push.sh
Normal file
10
{{cookiecutter.project_slug}}/scripts/build-push.sh
Normal file
@@ -0,0 +1,10 @@
|
||||
#! /usr/bin/env sh
|
||||
|
||||
# Exit in case of error
|
||||
set -e
|
||||
|
||||
TAG=${TAG} \
|
||||
FRONTEND_ENV=${FRONTEND_ENV-production} \
|
||||
source ./scripts/build.sh
|
||||
|
||||
docker-compose -f docker-stack.yml push
|
13
{{cookiecutter.project_slug}}/scripts/build.sh
Normal file
13
{{cookiecutter.project_slug}}/scripts/build.sh
Normal file
@@ -0,0 +1,13 @@
|
||||
#! /usr/bin/env sh
|
||||
|
||||
# Exit in case of error
|
||||
set -e
|
||||
|
||||
TAG=${TAG} \
|
||||
FRONTEND_ENV=${FRONTEND_ENV-production} \
|
||||
docker-compose \
|
||||
-f docker-compose.deploy.build.yml \
|
||||
-f docker-compose.deploy.images.yml \
|
||||
config > docker-stack.yml
|
||||
|
||||
docker-compose -f docker-stack.yml build
|
24
{{cookiecutter.project_slug}}/scripts/deploy.sh
Normal file
24
{{cookiecutter.project_slug}}/scripts/deploy.sh
Normal file
@@ -0,0 +1,24 @@
|
||||
#! /usr/bin/env sh
|
||||
|
||||
# Exit in case of error
|
||||
set -e
|
||||
|
||||
DOMAIN=${DOMAIN} \
|
||||
TRAEFIK_TAG=${TRAEFIK_TAG} \
|
||||
STACK_NAME=${STACK_NAME} \
|
||||
TAG=${TAG} \
|
||||
docker-compose \
|
||||
-f docker-compose.shared.admin.yml \
|
||||
-f docker-compose.shared.base-images.yml \
|
||||
-f docker-compose.shared.depends.yml \
|
||||
-f docker-compose.shared.env.yml \
|
||||
-f docker-compose.deploy.command.yml \
|
||||
-f docker-compose.deploy.images.yml \
|
||||
-f docker-compose.deploy.labels.yml \
|
||||
-f docker-compose.deploy.networks.yml \
|
||||
-f docker-compose.deploy.volumes-placement.yml \
|
||||
config > docker-stack.yml
|
||||
|
||||
docker-auto-labels docker-stack.yml
|
||||
|
||||
docker stack deploy -c docker-stack.yml --with-registry-auth ${STACK_NAME}
|
30
{{cookiecutter.project_slug}}/scripts/test-local.sh
Normal file
30
{{cookiecutter.project_slug}}/scripts/test-local.sh
Normal file
@@ -0,0 +1,30 @@
|
||||
#! /usr/bin/env bash
|
||||
|
||||
# Exit in case of error
|
||||
set -e
|
||||
|
||||
if [ $(uname -s) = "Linux" ]; then
|
||||
echo "Remove __pycache__ files"
|
||||
sudo find . -type d -name __pycache__ -exec rm -r {} \+
|
||||
fi
|
||||
|
||||
docker-compose \
|
||||
-f docker-compose.test.yml \
|
||||
-f docker-compose.shared.admin.yml \
|
||||
-f docker-compose.shared.base-images.yml \
|
||||
-f docker-compose.shared.depends.yml \
|
||||
-f docker-compose.shared.env.yml \
|
||||
-f docker-compose.dev.build.yml \
|
||||
-f docker-compose.dev.env.yml \
|
||||
-f docker-compose.dev.labels.yml \
|
||||
-f docker-compose.dev.networks.yml \
|
||||
-f docker-compose.dev.ports.yml \
|
||||
-f docker-compose.dev.volumes.yml \
|
||||
config > docker-stack.yml
|
||||
|
||||
# -f docker-compose.dev.command.yml \
|
||||
|
||||
docker-compose -f docker-stack.yml build
|
||||
docker-compose -f docker-stack.yml down -v --remove-orphans # Remove possibly previous broken stacks left hanging after an error
|
||||
docker-compose -f docker-stack.yml up -d
|
||||
docker-compose -f docker-stack.yml exec -T backend-tests /tests-start.sh
|
19
{{cookiecutter.project_slug}}/scripts/test.sh
Normal file
19
{{cookiecutter.project_slug}}/scripts/test.sh
Normal file
@@ -0,0 +1,19 @@
|
||||
#! /usr/bin/env sh
|
||||
|
||||
# Exit in case of error
|
||||
set -e
|
||||
|
||||
DOMAIN=backend \
|
||||
docker-compose \
|
||||
-f docker-compose.shared.base-images.yml \
|
||||
-f docker-compose.shared.env.yml \
|
||||
-f docker-compose.shared.depends.yml \
|
||||
-f docker-compose.deploy.build.yml \
|
||||
-f docker-compose.test.yml \
|
||||
config > docker-stack.yml
|
||||
|
||||
docker-compose -f docker-stack.yml build
|
||||
docker-compose -f docker-stack.yml down -v --remove-orphans # Remove possibly previous broken stacks left hanging after an error
|
||||
docker-compose -f docker-stack.yml up -d
|
||||
docker-compose -f docker-stack.yml exec -T backend-tests /tests-start.sh
|
||||
docker-compose -f docker-stack.yml down -v --remove-orphans
|
Reference in New Issue
Block a user