/docs/MyDocs

To get this branch, use:
bzr branch http://darksoft.org/webbzr/docs/MyDocs

« back to all changes in this revision

Viewing changes to Administration/Server/Containers/docker/compose.txt

  • Committer: Suren A. Chilingaryan
  • Date: 2017-04-03 02:45:17 UTC
  • Revision ID: csa@suren.me-20170403024517-dwzj0z0k1cmhxm7u
Restructuring, OpenShift, Ansible, Git

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Docker Composer
 
2
===============
 
3
 - Lists all shared resources, environments, and services (containers) in docker-compose.yml
 
4
   version: '<version>'
 
5
   volumes:
 
6
     <shared_volume>: { }
 
7
   <service_name>:
 
8
     image: <image_name>                                build: <path_to_dockerfile>
 
9
                                                        command: <starting command>
 
10
     volumes:
 
11
        - <host_path>:<container_path>
 
12
        - <shared_volume>:<container_path>
 
13
     ports:
 
14
        - <host_port>:<container_port>
 
15
     links:
 
16
        - <another_service>
 
17
     depends: 
 
18
        - <another_service_which_should_be_started_before>
 
19
     env_file:
 
20
        - .env
 
21
 
 
22
 - Build containers:
 
23
        docker-compose run <service> <command_in_container_to_make_initial_setup>
 
24
 - Start / Stop
 
25
        docker-compose up
 
26
        docker-compose stop
 
27
 - Get status about running services
 
28
        docker-compose ps
 
29