Skip to main content
removed the -d option, that won't work
Source Link
Anthon
  • 81.4k
  • 42
  • 174
  • 228

The sources for docker compose already have a create command, but it is not in 1.5.2 yet, nor documented on the website. You can of course try and install from the github source and get the latest (unreleased) features.

Alternatively you can try and change your systemd files to not start the individual containers using docker, but run docker-compose on the YAML files:

[Service]
Restart=always
ExecStart=/opt/util/docker-compose/bin/docker-compose -f /opt/docker/mongo/docker-compose.yml up -d --no-recreate
ExecStop=/opt/util/docker-compose/bin/docker-compose -f /opt/docker/mongo/docker-compose.yml stop

then you can just stop using systemctl stop ..., change the docker-compose.yml file, and start using systemctl start .... I am not sure though if the correct restarting is done in case one of the containers in the compose setup goes down.

The sources for docker compose already have a create command, but it is not in 1.5.2 yet, nor documented on the website. You can of course try and install from the github source and get the latest (unreleased) features.

Alternatively you can try and change your systemd files to not start the individual containers using docker, but run docker-compose on the YAML files:

[Service]
Restart=always
ExecStart=/opt/util/docker-compose/bin/docker-compose -f /opt/docker/mongo/docker-compose.yml up -d --no-recreate
ExecStop=/opt/util/docker-compose/bin/docker-compose -f /opt/docker/mongo/docker-compose.yml stop

then you can just stop using systemctl stop ..., change the docker-compose.yml file, and start using systemctl start .... I am not sure though if the correct restarting is done in case one of the containers in the compose setup goes down.

The sources for docker compose already have a create command, but it is not in 1.5.2 yet, nor documented on the website. You can of course try and install from the github source and get the latest (unreleased) features.

Alternatively you can try and change your systemd files to not start the individual containers using docker, but run docker-compose on the YAML files:

[Service]
Restart=always
ExecStart=/opt/util/docker-compose/bin/docker-compose -f /opt/docker/mongo/docker-compose.yml up --no-recreate
ExecStop=/opt/util/docker-compose/bin/docker-compose -f /opt/docker/mongo/docker-compose.yml stop

then you can just stop using systemctl stop ..., change the docker-compose.yml file, and start using systemctl start .... I am not sure though if the correct restarting is done in case one of the containers in the compose setup goes down.

Rollback to Revision 1
Source Link
Anthon
  • 81.4k
  • 42
  • 174
  • 228

The sources for docker compose already have a create command, but it is not in 1.5.2 yet, nor documented on the website. You can of course try and install from the github source and get the latest (unreleased) features.

Alternatively you can try and change your systemd files to not start the individual containers using docker, but run docker-compose on the YAML files:

[Service]
Restart=always
ExecStart=/opt/util/docker-compose/bin/docker-compose -f /opt/docker/mongo/docker-compose.yml up -d --no-recreate
ExecStop=/opt/util/docker-compose/bin/docker-compose -f /opt/docker/mongo/docker-compose.yml stop

then you can just stop using systemctl stop ..., change the docker-compose.yml file, and start using systemctl start .... I am not sure though if the correct restarting is done in case one of the containers in the compose setup goes down.

The sources for docker compose already have a create command, but it is not in 1.5.2 yet, nor documented on the website. You can of course try and install from the github source and get the latest (unreleased) features.

The sources for docker compose already have a create command, but it is not in 1.5.2 yet, nor documented on the website. You can of course try and install from the github source and get the latest (unreleased) features.

Alternatively you can try and change your systemd files to not start the individual containers using docker, but run docker-compose on the YAML files:

[Service]
Restart=always
ExecStart=/opt/util/docker-compose/bin/docker-compose -f /opt/docker/mongo/docker-compose.yml up -d --no-recreate
ExecStop=/opt/util/docker-compose/bin/docker-compose -f /opt/docker/mongo/docker-compose.yml stop

then you can just stop using systemctl stop ..., change the docker-compose.yml file, and start using systemctl start .... I am not sure though if the correct restarting is done in case one of the containers in the compose setup goes down.

deleted 663 characters in body
Source Link
Anthon
  • 81.4k
  • 42
  • 174
  • 228

The sources for docker compose already have a create command, but it is not in 1.5.2 yet, nor documented on the website. You can of course try and install from the github source and get the latest (unreleased) features.

Alternatively you can try and change your systemd files to not start the individual containers using docker, but run docker-compose on the YAML files:

[Service]
Restart=always
ExecStart=/opt/util/docker-compose/bin/docker-compose -f /opt/docker/mongo/docker-compose.yml up -d --no-recreate
ExecStop=/opt/util/docker-compose/bin/docker-compose -f /opt/docker/mongo/docker-compose.yml stop

then you can just stop using systemctl stop ..., change the docker-compose.yml file, and start using systemctl start .... I am not sure though if the correct restarting is done in case one of the containers in the compose setup goes down.

The sources for docker compose already have a create command, but it is not in 1.5.2 yet, nor documented on the website. You can of course try and install from the github source and get the latest (unreleased) features.

Alternatively you can try and change your systemd files to not start the individual containers using docker, but run docker-compose on the YAML files:

[Service]
Restart=always
ExecStart=/opt/util/docker-compose/bin/docker-compose -f /opt/docker/mongo/docker-compose.yml up -d --no-recreate
ExecStop=/opt/util/docker-compose/bin/docker-compose -f /opt/docker/mongo/docker-compose.yml stop

then you can just stop using systemctl stop ..., change the docker-compose.yml file, and start using systemctl start .... I am not sure though if the correct restarting is done in case one of the containers in the compose setup goes down.

The sources for docker compose already have a create command, but it is not in 1.5.2 yet, nor documented on the website. You can of course try and install from the github source and get the latest (unreleased) features.

Source Link
Anthon
  • 81.4k
  • 42
  • 174
  • 228
Loading