-
Notifications
You must be signed in to change notification settings - Fork 24
/
docker-compose.yml
52 lines (48 loc) · 1.5 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
version: "3.5"
services:
db:
environment:
POSTGRES_HOST_AUTH_METHOD: trust
image: "postgres:13"
networks:
- askdarcel
ports:
- "5432:5432"
api:
build:
context: .
dockerfile: Dockerfile.dev
depends_on:
- db
environment:
DATABASE_URL: postgres://postgres@db/askdarcel_development
TEST_DATABASE_URL: postgres://postgres@db/askdarcel_test
ALGOLIA_APPLICATION_ID:
ALGOLIA_API_KEY:
ALGOLIA_INDEX_PREFIX:
networks:
- askdarcel
volumes:
- .:/usr/src/app
# Avoid leftover server.pid files when container exits.
# https://auth0.com/blog/ruby-on-rails-killer-workflow-with-docker-part-1/
- type: tmpfs
target: /usr/src/app/tmp/pids
command: rails server --port=3000 --binding=0.0.0.0
ports:
- "3000:3000"
postman:
build:
context: .
dockerfile: Dockerfile.dev.postman
command: sh -c 'sleep 3 && curl -v http://api:3000/resources?category_id=1 >/dev/null && newman run postman/AskDarcel%20API.postman_collection.json -e postman/docker.postman_environment.json -g postman/globals.postman_globals.json && newman run postman/AskDarcel%20Admin%20API.postman_collection.json -e postman/docker.postman_environment.json -g postman/globals.postman_globals.json'
depends_on:
- api
networks:
- askdarcel
volumes:
- .:/usr/src/app
networks:
# Used to connect to askdarcel-web in a different docker-compose instance
askdarcel:
name: askdarcel