GithubHelp home page GithubHelp logo

docker / awesome-compose Goto Github PK

View Code? Open in Web Editor NEW
32.2K 32.2K 6.2K 7.3 MB

Awesome Docker Compose samples

Home Page: https://docs.docker.com/compose/

License: Creative Commons Zero v1.0 Universal

Dockerfile 16.04% JavaScript 5.32% TypeScript 9.20% HTML 35.61% CSS 3.45% C# 3.78% Python 5.85% Go 3.05% Java 6.10% Vue 1.74% Rust 9.37% PHP 0.03% SCSS 0.37% Shell 0.08%
awesome awesome-list docker-compose

awesome-compose's Introduction

The Moby Project

Moby Project logo

Moby is an open-source project created by Docker to enable and accelerate software containerization.

It provides a "Lego set" of toolkit components, the framework for assembling them into custom container-based systems, and a place for all container enthusiasts and professionals to experiment and exchange ideas. Components include container build tools, a container registry, orchestration tools, a runtime and more, and these can be used as building blocks in conjunction with other tools and projects.

Principles

Moby is an open project guided by strong principles, aiming to be modular, flexible and without too strong an opinion on user experience. It is open to the community to help set its direction.

  • Modular: the project includes lots of components that have well-defined functions and APIs that work together.
  • Batteries included but swappable: Moby includes enough components to build fully featured container systems, but its modular architecture ensures that most of the components can be swapped by different implementations.
  • Usable security: Moby provides secure defaults without compromising usability.
  • Developer focused: The APIs are intended to be functional and useful to build powerful tools. They are not necessarily intended as end user tools but as components aimed at developers. Documentation and UX is aimed at developers not end users.

Audience

The Moby Project is intended for engineers, integrators and enthusiasts looking to modify, hack, fix, experiment, invent and build systems based on containers. It is not for people looking for a commercially supported system, but for people who want to work and learn with open source code.

Relationship with Docker

The components and tools in the Moby Project are initially the open source components that Docker and the community have built for the Docker Project. New projects can be added if they fit with the community goals. Docker is committed to using Moby as the upstream for the Docker Product. However, other projects are also encouraged to use Moby as an upstream, and to reuse the components in diverse ways, and all these uses will be treated in the same way. External maintainers and contributors are welcomed.

The Moby project is not intended as a location for support or feature requests for Docker products, but as a place for contributors to work on open source code, fix bugs, and make the code more useful. The releases are supported by the maintainers, community and users, on a best efforts basis only, and are not intended for customers who want enterprise or commercial support; Docker EE is the appropriate product for these use cases.


Legal

Brought to you courtesy of our legal counsel. For more context, please see the NOTICE document in this repo.

Use and transfer of Moby may be subject to certain restrictions by the United States and other governments.

It is your responsibility to ensure that your use and/or transfer does not violate applicable laws.

For more information, please see https://www.bis.doc.gov

Licensing

Moby is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.

awesome-compose's People

Contributors

aiordache avatar alvanxp avatar carehart avatar chris-crone avatar dependabot[bot] avatar frgreiner avatar ganjmonk avatar glours avatar grantbirki avatar jdrouet avatar jfcg avatar justincormack avatar kouul avatar leonstoldt avatar lfvilella avatar milas avatar ndeloof avatar nicksieger avatar phamthainb avatar rahilsh avatar rickyalbanese avatar romainbelorgey avatar ryuichi1208 avatar sab-6 avatar stefanscherer avatar stvansolano avatar syed-afzal avatar thyrlian avatar tommoulard avatar yz4230 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

awesome-compose's Issues

go gRPC client with GRPC web

This issue is for the suggestion of a new application example.
The example may contain go GRPC Backend, envoy, GRPC web, VanillaJS frontend with NGNIX proxy.
If you approve i can pick this up?

nginx-flask-mysql - Bad Gateway Error

I cloned the repo and switched into the nginx-flask-mysql directory. However, when I run:

docker-compose up

local host shows Bad Gateway
image

Then when I run

docker-compose down

I see the following.

Removing network nginx-flask-mysql_backnet
WARNING: Network nginx-flask-mysql_backnet not found.
Removing network nginx-flask-mysql_frontnet
WARNING: Network nginx-flask-mysql_frontnet not found.

Idea-Proposal

Hello,

I am a beginner, I want to make docker-compose for a spring-boot app with MYSQL database, I may need some help for the same if allowed to do so, as I am a beginner. I have an example application for the same which you can see, Spring Boot Petclinic. Looking forward to hear back.

Thanks!

react-rust-postgres: "Rocket (core) requires a more recent version of rustc."

The react-rust-postgres example does not work due to "Rocket (core) requires a more recent version of rustc." error

$ docker logs react-rust-postgres_backend_1 
...
error: failed to run custom build command for `rocket v0.4.10`

Caused by:
  process didn't exit successfully: `/code/target/debug/build/rocket-918081dca64af494/build-script-build` (exit code: 101)
  --- stderr
  Error: Rocket (core) requires a more recent version of rustc.
  Installed version: 1.51.0 (2020-12-29)
  Minimum required:  1.54.0-nightly (2021-05-18)
  thread 'main' panicked at 'Aborting compilation due to incompatible compiler.', /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/rocket-0.4.10/build.rs:34:13
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed

0ae9d4c

nginx-flask-mysql/backend-requirements.txt file needs to update

nginx-flask-mysql requirements.txt file needs to be updated with the below

Flask==2.0.1
itsdangerous==2.0.1
mysql-connector==2.2.9

Otherwise it will give the below error

backend_1  | Traceback (most recent call last):
backend_1  |   File "/usr/local/bin/flask", line 5, in <module>
backend_1  |     from flask.cli import main
backend_1  |   File "/usr/local/lib/python3.8/site-packages/flask/__init__.py", line 19, in <module>
backend_1  |     from . import json
backend_1  |   File "/usr/local/lib/python3.8/site-packages/flask/json/__init__.py", line 15, in <module>
backend_1  |     from itsdangerous import json as _json
backend_1  | ImportError: cannot import name 'json' from 'itsdangerous' (/usr/local/lib/python3.8/site-packages/itsdangerous/__init__.py)

Aspnet sample connection to db

The aspnet example starts two containers, the Web app and the sql server database. However the Web app doesn't appear to utilise or connect to the database from what I can see. It might be useful to show the Web app actually using the database in some way..

Can not use docker compose for sample prometheus-grafana

I wanted to run Prometheus Grafana docker compose sample. I see following error message.

d:\awesome-compose\prometheus-grafana>docker-compose up -d
Creating prometheus ... error
Creating grafana ...

ERROR: for prometheus Cannot create container for service prometheus: status code not OK but 500: ☺ ˙˙˙˙☺ ♀☻ FDocker.Core, Version=3.0.2.51106, Culture=neutral, PublicKeyToken=null♣☺ ←Docker.Core.DockerException♀ ClassNameMessage♦Data♫InnerExceptionHelpURL►StackTraceString▬RemoteStackTraceString►RemoteStackIndex☼ExceptionMethodHResult♠SourWatsonBuckets☺☺♥♥☺☺☺ ☺ ☺▲System.Collections.IDictionary►System.Excepti☻☻ ♠♥ ←Docker.Core.DockerException♠♦ ▲Filesharing has been cancelled

♠♣ Ś‼ at Docker.ApiServices.Mounting.FileSharing.d__8.MoveNext() in C:\workspaces\PR-15138\src\github.com\docker\pinata\win\src\Docker.ApiServices\Mounting\FileSharing.cs:line 0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

Bonne

Bonjour je vous remercie de bien vouloir me confirmer la réception des documents

Update nginx-flask-mysql sample

  • Be sure the backend create a connection to the database
  • Check Mysql version (latest one is 8.0.19)
  • Don't use default docker compose network, create a specific one

command not found when starting express backend

i am trying to use the react-express-mysql.

when hitting

docker compose build

and then

docker-compose up`

the frontend starts up correctly on the port 3000, however the express backend is not.

backend_1   |
backend_1   | > [email protected] start-watch
backend_1   | > nodemon src/index.js --inspect=0.0.0.0:9229
backend_1   |
backend_1   | sh: 1: nodemon: not found

Do you happen to know what might be a good fix for this?

Thanks in advance!

Request sample for elasticsearch-logstash-kibana (ELK) stack

ELK stack consists of three open source projects: Elasticsearch, Logstash, and Kibana.

  • Elasticsearch is a search and analytics engine.
  • Logstash is a server‑side data processing pipeline that ingests data from multiple sources simultaneously, transforms it, and then sends it to a "stash" like Elasticsearch.
  • Kibana lets users visualize data with charts and graphs in Elasticsearch.

ELK is widely used in the industry by a ton of companies from small startups to giant multinational corporations. ELK provides you with a centralized place to search, analyze and visualize all the logs.

WooCommerce and PhP

I am wanting to get woocommerce working through docker-compose. It would be nice to have a CI/CDI for a wordpress woocommerce docker-compose file or something nice like that. SLL cert is not working although the rest of the sever off the docker is working. How can I upgrade wordpress when that happens. a lot I am trying to answer for. is there any build where woocommerce is able to be used properly with a docker-compose wordpress?

New Example Proposal.

I have been working with Traefik, ReactJS, Express and MongoDB.

I would like to contribute a sample for

  • Getting started with these technologies.
  • Using traefik in development and production.

Express / MongoDB example

I was looking at the repo and haven't found any example using express with mongo and since this is a ordinary stack for JS developers i believe it could be really helpful.

Add YAML / source code linting

A lot of the examples have stray white space, strange tabs and YAML linting errors.

I guess when the catalogue grows and there isn't linting, things can break easily.

docker-compose for nodejs and postgres connection

Hello
I hope you guys are well
So I would like to suggest a sample for nodejs with postgres connection, it could have:

  • a simple NodeJS app using Express
  • Postgres
  • And docker-compose file for setting the environment.
  • The connection between the nodejs app and postgres could be made through networks in compose.

In my profile there's some examples using docker-compose with nodejs.

It would be great contributing to this repository.

Awesome-compose as an apt package

It would be good to have awesome-compose as a package that is easy to install for everyone.

For instance, if I want to install it I could just use:

$ apt-get install awesome-compose or awesome-docker-compose

don't mind the name, I am just suggesting name that could go along.

And, if I want to use it(I will take flask as an example here), I could use:

$ awesome-compose flask
-- with nginx: I would simply add argument like -nx
-- with mongo: I would simply add -mg

So when I run awesome-compose flask -nx -mg, this would result in creation of the folder 'nginx-flask-mongo' that is in this repo.

Is this do-able? What are your thoughts?

Consistency of YAML indentation

I know it doesn't affect the functionality of the compose files, but it does affect scan-ability and might raise questions if folks see inconsistencies. One example...

    image: postgres
    restart: always
    secrets:
    - db-password
    volumes:
    - db-data:/var/lib/postgresql/data
    networks:
      - spring-postges

The networks config is indented while the secrets and volumes aren't. Personally, I like indenting all lists as it makes easier to scan the keys. But, I'm fine with not indenting as long as it's consistent. I'd gladly update them and submit a PR if someone tells me which way to go.

Keninkela

Bonjour je suis Youssouf Bava Diallo
Du Mali cav de jamais à toutes et tous merci beaucoup

React-Golang sample submission

I have developed a sample for React (Frontend) and Golang (Backend) applications. I believe it could be useful. If I get the green light I will create a pull request. Thank you.

Edit: It is a basic setup (useful for personal use). It supports features like live reload.

Adding more examples

Hi,
i stumbled upon this repository yesterday and I really like the idea of providing / sharing docker-compose sample files. That is why I would love to share my docker-compose files, which I am using for my homelab setup.

I would offer the following examples:

  • Pi-hole / cloudflared example for use of DNS over HTTPS
  • postgreSQL / pgAdmin example
  • portainer example
  • Plex example
  • wireguard example

I hope this can be helpful and I will provide a pull request for review.

I used react-java-mysql as base project and added react-express-mysql backend only

This is not issue! Help Required!

@glours @jdrouet @aiordache

I have to combine java-mysql and express-mysql in one react app . Java-mysql working fine as it uses 8080 port but unfortunately express-mysql does not seems to be work ,

Please refer below docker-compose file
docker-compose.txt

backend-java uses db-mysql-java
backend-node uses db-mysql-node

in backend-node port 80 replaced by 8086:8085 still can not able to access node api in react project
setup proxy contains code

module.exports = function(app) {
  app.use(
    "/api-java",
    createProxyMiddleware({
      target: "http://backend-java:8080",       // it works fine
      pathRewrite: { "^/api-java": "" }
    })
  );

  app.use(
    "/api-node",
    createProxyMiddleware({
      target: "http://backend-node:8085",    // it does not work 
      pathRewrite: { "^/api-node": "" }
    })
  );
};

which configuration i have to override in this scenario?
Please help me!

nginx-flask-mysql: error after typing localhost

Hello,

OS:

  • Ubuntu 20.04
  • Docker version 20.10.7

I created and copied contents from each file in corresponding folders inside nginx-flask-mysql respectively.

Folders are in same path named:

  • backend
  • db
  • proxy

A file in the same path of those folders above named:

  • docker-compose.yml

I ran the following code without problem:

docker-compose up

I can see them running by the following code:

docker ps

I opened the browser and typed:

http://localhost OR
http://localhost:5000

And returned:

500 Internal Server Error
Internal Server Error
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

I entered the database and found out the database this example created has no tables. Is that why???

Can someone please help me.

Thank you.

Running Server:

1

500 Error in Browsing:

2

docker-compsose for jenkins, nginx, node with pm2

I want need to deploy an node app and integrate jenkins, this is what I have developed so far.

Docker compose file will start three services.

  1. Jenkins
  2. Nginx
  3. An image from Dockerfile. This will be the node app.
    This node app will run on port 3000:3000 and nignx will be forwarding all the request to this port http://localhost:3000

From jenkins dashboard. I will ssh into the node-app container, and it will fetch the repo from github.

Update react-express-mysql sample

  • Be sure the backend create a connection to the database
  • Check Mysql version (latest one is 8.0.19)
  • Don't use default docker compose network, create a specific one
  • Rewrite the react application and be sure to call the backend

adding readonly flag to bind mount failing anonymous volume creation

Referencing to the example at line no. 8
If I add readonly flag :ro to the line '- ./frontend:/usr/src/app:ro' then I start getting error
If I don't add readonly flag then the container adds the node_modules folder in my host code folder.

Error response from daemon: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: rootfs_linux.go:76: mounting "/var/lib/docker/volumes/8f284ecac85f3340306fa030d267c1b24c27331f118ddb24c6fd48d31a1be4a8/_data" to rootfs at "/usr/src/app/node_modules" caused: mkdir /var/lib/docker/overlay2/4e1f5b46187f9dd7d061c39fff5415fd033a4fe80ac983e08228da2fe732ec09/merged/usr/src/app/node_modules: read-only file system: unknown

I'm using Docker Desktop 4.4 and Docker Compose 2.2.3 using WSL2 Linux Containers
My Host machine is Windows 11 and code is in a folder in d: drive

This project is abandoned?

Hi guys, the last PR was committed 21 days ago, and after that 2 months ago. This project is left behind?

Thanks.

ERROR: "/workdir/server/target/dependency/BOOT-INF/lib" not found: not found

Hi,

I followed the awesome-compose spring-postgres repo.
When i try to buid spring api Docker file, i've got this error :

#16 ERROR: "/workdir/server/target/dependency/BOOT-INF/lib" not found: not found

[stage-1 2/4] COPY --from=builder /workdir/server/target/dependency/BOOT-INF/lib /app/lib:



[stage-1 3/4] COPY --from=builder /workdir/server/target/dependency/META-INF /app/META-INF:



[stage-1 4/4] COPY --from=builder /workdir/server/target/dependency/BOOT-INF/classes /app:


failed to compute cache key: "/workdir/server/target/dependency/BOOT-INF/classes" not found: not found
Service 'api' failed to build

Can you tell me what i didwrong ?
Thank you

Sample for apache-php

A sample for a container running php on apache could be useful.
I already have the sample, if I get the green light, I will make the pull request :)

  • Image used will be php:7.2-apache

update react-java-mysql sample

  • Be sure the backend create a connection to the database
  • Check Mysql version (latest one is 8.0.19)
  • Don't use default docker compose network, create a specific one
  • Rewrite the react app and be sure to call the backend

vitejs-react / postgrest / postgres example

Hello,

I prepared a docker-compose using the following stack:

  • nginx to serve assets of react webapp bootstraped with vitejs
  • postgrest backend, that exposes REST api for all the data model in the db
  • postgres db

That seems to be a good candidate to bootstrap small fullstack projects that do not need any business logic at backend side.

Do you think such an example could be valuable? I can open a pull request if you are interested in.

Compose file is invalid

devuser@devbox:~/IdeaProjects/xxxxx/awesome-compose/react-java-mysql$ docker-compose up -d
ERROR: The Compose file './docker-compose.yaml' is invalid because:
services.backend.depends_on contains an invalid type, it should be an array

Please help

Docker-In-Docker during the build process (Java / TestContainer)

Hi,

Thx for this repository action.

I'm wondering how you can use a Docker build approach when you need to embed Docker during the build process. For example, if we want to use TestContainer for a Java application. You can't because you can mount a file during a build process (/var/run/docker.sock)

Best,

Mickael

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.