-
Notifications
You must be signed in to change notification settings - Fork 19
/
docker-compose.yaml
64 lines (61 loc) · 1.82 KB
/
docker-compose.yaml
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
53
54
55
56
57
58
59
60
61
62
63
64
version: '3.9'
services:
redis:
container_name: pippin_redis
image: redis:7-alpine
restart: unless-stopped
ports:
- '127.0.0.1:6385:6379'
networks: [ 'app-network' ]
db:
container_name: pippin_postgres
image: postgres:14
ports:
- '127.0.0.1:54337:5432'
restart: unless-stopped
environment:
- POSTGRES_DB=pippin
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- PGDATA=/var/lib/postgresql/data/dev
volumes:
- .data/postgres:/var/lib/postgresql/data:delegated # Delegated indicates the containers view of the volume takes priority
- ./scripts/setup_test_db.sh:/docker-entrypoint-initdb.d/setup_test_db.sh
networks: [ 'app-network' ]
app:
container_name: pippin_dev
security_opt:
- "seccomp:unconfined"
environment:
- DB_HOST=db
- DB_PORT=5432
- DB_USER=postgres
- DB_PASS=postgres
- DB_NAME=pippin
- DB_MOCK_HOST=db
- DB_MOCK_PORT=5432
- DB_MOCK_USER=postgres
- DB_MOCK_PASS=postgres
- DB_SSLMODE=disable
- DATABASE_URL=postgres://postgres:postgres@db:5432/pippin
- REDIS_HOST=redis
- GOPRIVATE=github.com/appditto
ports:
- '127.0.0.1:8090:8080'
- '127.0.0.1:2346:2345'
build:
context: .
dockerfile: Dockerfile.dev
volumes:
- $PWD:/app
restart: on-failure
entrypoint: /bin/zsh
stdin_open: true
tty: true
depends_on:
- db
- redis
networks: [ 'app-network' ]
networks:
app-network:
driver: bridge