Giter Club home page Giter Club logo

docker-compose-structure-questions's Introduction

This is a failed attempt at getting my head around the structure for docker-compose for multiple environments.

The goals:

  • Keep the environment-specific docker-compose configurations as small as possible (maximize reuse of configuration). (I started experimenting with using .env files.)
  • Allow (non-swarm) servers to keep sensitive information outside of SCM, in a designated directory. (My thought was to use a ./var directory, which is in SCM, but which has its contents ignored.)

From the localdev directory, things behave as expected:

$ cd docker-compose/localdev/
$ docker-compose up --build -d
WARNING: The Docker Engine you're using is running in swarm mode.

Compose does not use swarm mode to deploy services to multiple nodes in a swarm. All containers will be scheduled on the current node.

To deploy your application across the swarm, use `docker stack deploy`.

Building solr
Step 1/2 : FROM alpine
 ---> 7328f6f8b418
Step 2/2 : ENTRYPOINT tail -f /dev/null
 ---> Using cache
 ---> 94a7672e2ac0
Successfully built 94a7672e2ac0
Successfully tagged local/solr-mariadb:6.6.0_localdev
Recreating solr_localdev ...
Recreating solr_localdev ... done

From the test1 directory (which emulates how it would be run on the server), my attempts at factoring the environment-specific docker-compose.yml and/or the use of the remote .env file causes problems.

$ cd docker-compose/localdev/
$ docker-compose up --build -d
WARNING: The Docker Engine you're using is running in swarm mode.

Compose does not use swarm mode to deploy services to multiple nodes in a swarm. All containers will be scheduled on the current node.

To deploy your application across the swarm, use `docker stack deploy`.

Building solr
Step 1/2 : FROM alpine
 ---> 7328f6f8b418
Step 2/2 : ENTRYPOINT tail -f /dev/null
 ---> Using cache
 ---> 94a7672e2ac0
Successfully built 94a7672e2ac0
Successfully tagged local/solr-mariadb:6.6.0_localdev
Recreating solr_localdev ...
Recreating solr_localdev ... done
ICF2008571:localdev jjackson$ cd ..
ICF2008571:docker-compose jjackson$ cd test1/
ICF2008571:test1 jjackson$ docker-compose up --build -d
WARNING: The DB_HOST variable is not set. Defaulting to a blank string.
WARNING: The DB_SCHEMA variable is not set. Defaulting to a blank string.
WARNING: The DB_USER variable is not set. Defaulting to a blank string.
WARNING: The DB_PASSWORD variable is not set. Defaulting to a blank string.
WARNING: The SOLR_CONTAINER_SUFFIX variable is not set. Defaulting to a blank string.
WARNING: The SOLR_PUBLISH_PORT variable is not set. Defaulting to a blank string.
ERROR: The Compose file './../common/docker-compose.yml' is invalid because:
services.solr.ports is invalid: Invalid port ":8983", should be [[remote_ip:]remote_port[-remote_port]:]port[/protocol]

docker-compose-structure-questions's People

Contributors

jamiejackson avatar

Watchers

 avatar  avatar

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.