5 prism_languages: [yaml]
19 # build from Dockerfile
21 dockerfile: Dockerfile
39 docker-compose unpause
55 # build from Dockerfile
57 args: # Add build arguments
62 # build from custom Dockerfile
65 dockerfile: Dockerfile.dev
73 image: example-registry:4000/postgresql
82 - "8000:80" # host:container
86 # expose ports to linked services (not to host)
94 command: bundle exec thin -p 3000
95 command: [bundle, exec, thin, -p, 3000]
99 # override the entrypoint
100 entrypoint: /app/start.sh
101 entrypoint: [php, -d, vendor/bin/phpunit]
104 ### Environment variables
109 RACK_ENV: development
111 - RACK_ENV=development
115 # environment vars from file
117 env_file: [.env, .development.env]
123 # makes the `db` service available as the hostname `database`
124 # (implies depends_on)
131 # make sure `db` is alive before starting
137 # make sure `db` is healty before starting
138 # and db-init completed without failure
141 condition: service_healthy
143 condition: service_completed_successfully
149 # make this service extend another
151 file: common.yml # optional
158 - ./_data:/var/lib/mysql
162 # automatically restart container
163 restart: unless-stopped
164 # always, on-failure, no (default)
176 com.example.description: "Accounting web app"
196 - "/dev/ttyUSB0:/dev/ttyUSB0"
212 # declare service healthy when `test` command succeed
214 test: ["CMD", "curl", "-f", "http://localhost"]
227 - "somehost:192.168.1.100"
233 # creates a custom network called `frontend`
241 # join a pre-existing network
251 # mount host paths or named volumes, specified as sub-options to a service
253 image: postgres:latest
255 - "/var/run/postgres/postgres.sock:/var/run/postgres/postgres.sock"
256 - "dbdata:/var/lib/postgresql/data"
270 # specifying both user and group with ids