-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dc: use extends instead of composition
- Loading branch information
1 parent
56fb108
commit 588da5d
Showing
6 changed files
with
75 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,10 +14,10 @@ jobs: | |
run: docker login -u publisher -p ${{ secrets.GHCR_TOKEN }} ghcr.io | ||
|
||
- name: build images | ||
run: docker-compose -f docker-compose.yml -f prod.yml build | ||
run: docker-compose -f prod.yml build | ||
|
||
- name: publish to registry | ||
run: docker-compose -f docker-compose.yml -f prod.yml push | ||
run: docker-compose -f prod.yml push | ||
|
||
- name: deploy to swarm | ||
run: | | ||
|
@@ -27,21 +27,7 @@ jobs: | |
eval $(ssh-agent) | ||
ssh-add "$HOME/.ssh/docker" | ||
echo "crossroadsajax.church $SSH_KNOWN_HOST" >> ~/.ssh/known_hosts | ||
docker --log-level debug --host "ssh://[email protected]" stack deploy -c docker-compose.yml -c prod.yml --with-registry-auth prod | ||
shell: bash | ||
env: | ||
SSH_PRIV_KEY: ${{ secrets.DOCKER_SSH_PRIVATE_KEY }} | ||
SSH_KNOWN_HOST: ${{ secrets.DOCKER_SSH_PUBLIC_KEY }} | ||
|
||
- name: deploy to swarm | ||
run: | | ||
mkdir -p "$HOME/.ssh" | ||
echo "$SSH_PRIV_KEY" > "$HOME/.ssh/docker" | ||
chmod 600 "$HOME/.ssh/docker" | ||
eval $(ssh-agent) | ||
ssh-add "$HOME/.ssh/docker" | ||
echo "crossroadsajax.church $SSH_KNOWN_HOST" >> ~/.ssh/known_hosts | ||
docker --log-level debug --host "ssh://[email protected]" stack deploy -c docker-compose.yml -c prod.yml --with-registry-auth prod | ||
docker --host "ssh://[email protected]" stack deploy -c prod.yml --with-registry-auth prod | ||
shell: bash | ||
env: | ||
SSH_PRIV_KEY: ${{ secrets.DOCKER_SSH_PRIVATE_KEY }} | ||
|
@@ -58,10 +44,10 @@ jobs: | |
run: docker login -u publisher -p ${{ secrets.GHCR_TOKEN }} ghcr.io | ||
|
||
- name: build images | ||
run: docker-compose -f docker-compose.yml -f staging.yml build | ||
run: docker-compose -f staging.yml build | ||
|
||
- name: publish to registry | ||
run: docker-compose -f docker-compose.yml -f staging.yml push | ||
run: docker-compose -f staging.yml push | ||
|
||
- name: deploy to swarm | ||
run: | | ||
|
@@ -71,7 +57,7 @@ jobs: | |
eval $(ssh-agent) | ||
ssh-add "$HOME/.ssh/docker" | ||
echo "crossroadsajax.church $SSH_KNOWN_HOST" >> ~/.ssh/known_hosts | ||
docker --log-level debug --host "ssh://[email protected]" stack deploy -c docker-compose.yml -c staging.yml --with-registry-auth staging | ||
docker --host "ssh://[email protected]" stack deploy -c staging.yml --with-registry-auth staging | ||
shell: bash | ||
env: | ||
SSH_PRIV_KEY: ${{ secrets.DOCKER_SSH_PRIVATE_KEY }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
version: '3.7' | ||
|
||
services: | ||
app: | ||
build: | ||
context: ./ | ||
dockerfile: ./docker/server/Dockerfile | ||
environment: | ||
- DATADOG_TRACE_AGENT_HOSTNAME=datadog | ||
- DD_ENV=dev | ||
- DD_SERVICE=crossroads-web | ||
- DD_LOGS_INJECTION=true | ||
- DD_TRACE_ANALYTICS_ENABLED=true | ||
- DD_TRACE_ASYNCIO_ENABLED=true | ||
- DD_DJANGO_CACHE_SERVICE_NAME=crossroads-cache | ||
- DD_DJANGO_DATABASE_SERVICE_NAME=crossroads-web | ||
- DD_DJANGO_USE_HANDLER_RESOURCE_FORMAT=true | ||
- DD_SQLITE_SERVICE=crossroads-db | ||
- DD_PROFILING_ENABLED=true | ||
|
||
nginx: | ||
restart: always | ||
|
||
datadog: | ||
environment: | ||
- DD_CONTAINER_EXCLUDE="name:datadog" | ||
- DD_APM_ENABLED=true | ||
- DD_LOGS_ENABLED=true | ||
- DD_LOGS_CONFIG_CONTAINER_COLLECT_ALL=true | ||
build: | ||
context: ./docker/datadog | ||
dockerfile: ./Dockerfile | ||
volumes: | ||
- /var/run/docker.sock:/var/run/docker.sock | ||
- /proc/:/host/proc/:ro | ||
- /sys/fs/cgroup:/host/sys/fs/cgroup:ro |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters