Comments (7)
No problem. I added the following content to config/deploy-templates/service/mockservices/default/mockservices.yml.twig:
{{ serviceName }}:
build:
context: ./mockservices
networks:
- private
- public
labels:
'spryker.app.name': mockservices
'spryker.app.type': hidden
'spryker.project': ${SPRYKER_DOCKER_PREFIX}:${SPRYKER_DOCKER_TAG}
healthcheck:
test: [ "CMD", "nc", "-z", "localhost", "8008" ]
interval: 5s
timeout: 5s
retries: 5
volumes:
{% include "application-volumes.yml.twig" with project %}
and the following to config/deploy-templates/nginx/http/gateway/mockservices.server.conf.twig:
{% extends "nginx/http/gateway/server.conf.twig" %}
{% block upstream %}{{ upstream }}:8008{% endblock upstream %}
Finally the following was added to deploy.yml:
services:
mockservices:
engine: mockservices
endpoints:
services.spryker.local:
There is a Dockerfile in the mockservices directory that builds a tiny flask app for developing locally ...
Now after docker/sdk boot and docker/sdk up I have my flask app running and available at services.spryker.local.
from docker-sdk.
Hi @uwej711,
I believe Docker/SDK provides required feature OOTB.
You could extend the default functionality via custom docker-compose file:
Like an example:
deploy.yml
docker:
compose:
yamls:
- docker-compose.custom.yml
docker-compose.custom.yml
version: 3.7
services:
my-custom-service:
image:....
https://docs.docker.com/compose/extends/
I hope it will be helpful and have a great evening.
from docker-sdk.
@alexanderM91 I tried what you suggested but it does not work. See the linked PR for a solution that allows what I want to achieve.
from docker-sdk.
Hi @uwej711, could you please answer for several small questions?
How we fix an issue just with a new folder?
Why cannot we reuse deploy-templates
for storing necessary service templates?
from docker-sdk.
Of course those can be placed in the same folder. But we still have to add the folder to the Twig ChainLoader, see my PR. I can easily adjust that.
from docker-sdk.
PR updated
from docker-sdk.
Hi @uwej711, thanks a lot for your contribution.
It would be great if you could provide us the examples of the configuration you did.
Thank you.
from docker-sdk.
Related Issues (20)
- Section demodata is hard-coded, impossible to use meaningful name instead HOT 4
- Key `sections` is not explained for installation recipes HOT 2
- Docker SDK sets wrong xDebug host ip environment variable when using WSL 2 HOT 3
- GitHub Action - service "cli" is not running container #1 HOT 7
- Missing SPRYKER_FE_HOST & SPRYKER_FE_PORT in glue-storefront HOT 2
- docker/sdk reset command fails to run transfer:generate HOT 1
- On Linux systems 'docker-compose' is not found when 'docker compose' is installed HOT 2
- Cannot install Spryker using Docker SDK HOT 3
- Docker external cache sources HOT 1
- Wrong NodeJS version with debian plattform image (image.node.version is ignored) HOT 4
- Sporadical WebDriver timeout in acceptance tests HOT 5
- service "cli" is not running container HOT 3
- Allow passing custom environment variables through sdk HOT 2
- bin/service/database/mysql.sh: line 48: [: : integer expression expected HOT 2
- Allow for JSON environment variables
- failed to get console during docker/sdk up HOT 1
- bash shebang is not platform agnostic
- Reduce verbosity of `composer install` in `application-production-dependencies` stage
- Mount files db in RAM
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-sdk.