version services wishlistd-dev network_mode host container_name wishli

 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
65
66
67
68
69
70
version: "3.7"
services:
wishlistd-dev:
network_mode: host
container_name: wishlistd-dev
build:
context: ../
target: build
env_file:
- default.env
- local.env
depends_on:
- wishlistd-db
volumes:
- "..:/app/"
working_dir: "/app"
command: "go run main.go"
wishlistd-db:
network_mode: host
container_name: wishlistd-db
image: postgres:11.4
environment:
- POSTGRES_DB=wishlistd
- POSTGRES_USER=wishlistd
- POSTGRES_PASSWORD=wishlistd
- POSTGRES_PORT=5432
wishlistd-migrate:
network_mode: host
container_name: wishlistd-migrate
image: "migrate/migrate:v4.4.0"
env_file:
- default.env
- local.env
depends_on:
- wishlistd-db
- wishlistd-db-wait
volumes:
- "../migrations:/migrations"
command: ["-path", "/migrations/", "-database", "$SERVICE_DB_DSN", "up"]
wishlistd-migrate-down:
network_mode: host
container_name: wishlistd-migrate-down
image: "migrate/migrate:v4.4.0"
env_file:
- default.env
- local.env
depends_on:
- wishlistd-db
- wishlistd-db-wait
volumes:
- "../migrations:/migrations"
command: ["-path", "/migrations/", "-database", "$SERVICE_DB_DSN", "down", "1"]
wishlistd-db-wait:
network_mode: host
image: base.docker.lamoda.ru/utils/waitport
environment:
- WAIT_PORT=5432
- WAIT_TIMEOUT=120
- WAIT_HOST=127.0.0.1
depends_on:
- wishlistd-db
wishlistd-server-wait:
network_mode: host
image: base.docker.lamoda.ru/utils/waitport
environment:
- WAIT_PORT=8080
- WAIT_TIMEOUT=120
- WAIT_HOST=wishlistd-dev
depends_on:
- wishlistd-dev