Factsheet
How to use docker-compose with GitHub Actions?
How can I make docker-compose build an image from a remote git repository? - Stack Overflow
Running docker compose services with config files from Github Actions
i created a docker compose example on github
Videos
Are you running version 1.5.2? It looks like this was actually recently added in https://github.com/docker/compose/pull/2430. Try upgrading.
Example:
---
version: '2'
services:
redis:
image: "redis:3.2.3"
hostname: redis
redis-commander:
build: https://github.com/joeferner/redis-commander.git
command: --redis-host redis
links:
- "redis:redis"
ports:
- 8081
Tested with:
$ docker-compose -v
docker-compose version 1.11.2, build dfed245
The file tests/unit/config/config_test.py shows:
def test_valid_url_in_build_path(self):
valid_urls = [
'git://github.com/docker/docker',
'[email protected]:docker/docker.git',
'[email protected]:atlassianlabs/atlassian-docker.git',
'https://github.com/docker/docker.git',
'http://github.com/docker/docker.git',
'github.com/docker/docker.git',
]
This is confirmed with compose/config/config.py#L79-L85:
DOCKER_VALID_URL_PREFIXES = (
'http://',
'https://',
'git://',
'github.com/',
'git@',
)
I created a docker compose example just for fun - it has a full stack of frontend, backend and database just as a way to learn more about docker compose.
I have no idea if anything is interested but posting it anyway (just my shout in the void I guess). If anyone has problems to compile it, just write.
https://github.com/sashoalm/docker-compose-example
This project shows how to create a full stack - Angular frontend (folder my-frontend), C# backend (folder my-backend), and MySQL database (folder my-database), and wire them together using Docker compose. There is an nginx reverse proxy (folder my-proxy) which routes traffic to the frontend and backend. To build and run it, just run "docker compose up" at the project's root folder. The server will be available at http://localhost:8080
When running, it shows just one table which displays numbers. You can add numbers. The frontend calls the backend, which stores the numbers in the database. The database is seeded with seed.sql.