Comments (4)
A temporary workaround could be to add an alias to bash
from martin.
This is a common problem, that will still remain some years, until docker compose
is the only command.
We solved this in a workshop launch control Bash script like @nyurik indicated: sniff for the variant and set an alias
. See these lines i.e.:
# Sniff which Docker Compose variant is installed
# and set an alias.
# See https://github.com/geopython/geopython-workshop/issues/82
if command docker-compose --version &> /dev/null
then
alias dockercompose='docker-compose'
echo "Using docker-compose"
else
if !command docker compose version &> /dev/null
then
echo "Neither docker-compose nor docker compose is available"
echo "Check your Docker Installation"
exit 1
fi
alias dockercompose='docker compose'
echo "Using docker compose"
fi
..and then use the alias dockercompose
. Never heard of just
(other than my first name..) but seems something to be added in the justfile as bash
is presumed? Will PR...
from martin.
I think we may need to test if the system has a docker-compose
, and if it does not, use docker compose
- something similar to the check we have in the cargo-install
just command - but do it once when just starts up?
from martin.
The "bash-script" approach in my comment above does not really work direct in a justfile
because of the 'just-syntax'. But figured out an alternative, using standard var and -substitution, so an approach with oneliner:
dockercompose := `if docker-compose --version &> /dev/null; then echo "docker-compose"; else echo "docker compose"; fi`
.
.
up:
{{ dockercompose }} up
up-build:
{{ dockercompose }} up --build
.
.
There is a justfile
in the repo root and the demo
dir. Will go ahead with this approach.
from martin.
Related Issues (20)
- Store compression type in the metadata table
- Store hashing algorithm in the metadata table HOT 2
- How to add array and hstore columns type in properties
- Make PMTiles directory cache shared between files HOT 2
- Document using Martin as a AWS Lambda using PMTiles on S3, or another cloud provider HOT 2
- Fix flaky MacOS CI test, possibly using preinstalled Github's MacOS nginx instead HOT 2
- Cache tiles in ready-to-serve encoding
- Serving fonts while Martin is used with nginx returns HTTP 400
- Martin ล afรกล HOT 2
- Add web-based UI for Martin HOT 12
- maputnik v1.7.0, martin v0.12.0 serving OpenMapTiles osm-2020-02-10-v3.11_north-america.mbtiles
- My martin catalog is empty HOT 2
- Add cache configuration HOT 2
- Run Martin on subpath with Traefik proxy HOT 1
- Some `mbtiles` tool operations produce db or disk/machine out of space errors HOT 3
- Migrate MacOS CI to use new MacOS M1 runners
- Implement PMTiles S3 bucket support with authentication HOT 2
- Martin v0.11.6 much faster than v0.12.0 and 0.13.0?? HOT 3
- Implement `--preferred-encoding (gzip|brotli)` configuration
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 martin.