-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
executable file
·61 lines (58 loc) · 2.07 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
53
54
55
56
57
58
59
60
61
services:
db:
image: postgres:13
restart: always
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- postgres_data:/var/lib/postgresql/data
- ./init_db.sql:/docker-entrypoint-initdb.d/init_db.sql
ports:
- "5432:5432"
notifier:
container_name: notifier
build: ./notifier
platform: linux/amd64
image: ghcr.io/jotpalch/portcdm-notifier
depends_on:
- db
restart: always
environment:
PYTHONUNBUFFERED: 1
LINE_NOTIFY_TOKEN: ${LINE_NOTIFY_TOKEN}
LINE_NOTIFY_TOKEN_PILOT: ${LINE_NOTIFY_TOKEN_PILOT}
LINE_NOTIFY_TOKEN_UNMOORING: ${LINE_NOTIFY_TOKEN_UNMOORING}
LINE_NOTIFY_TOKEN_TUGBOAT: ${LINE_NOTIFY_TOKEN_TUGBOAT}
LINE_NOTIFY_TOKEN_SHIPPINGAGENT_WAN_HAI: ${LINE_NOTIFY_TOKEN_SHIPPINGAGENT_WAN_HAI}
LINE_NOTIFY_TOKEN_SHIPPINGCOMPANY_YANG_MING: ${LINE_NOTIFY_TOKEN_SHIPPINGCOMPANY_YANG_MING}
LINE_NOTIFY_TOKEN_LOADINGUNLOADING_LIEN_HAI: ${LINE_NOTIFY_TOKEN_LOADINGUNLOADING_LIEN_HAI}
LINE_NOTIFY_TOKEN_CIQS: ${LINE_NOTIFY_TOKEN_CIQS}
LINE_NOTIFY_TOKEN_PIER_LIEN_HAI: ${LINE_NOTIFY_TOKEN_PIER_LIEN_HAI}
LINE_NOTIFY_TOKEN_PIER_SELF_OPERATED: ${LINE_NOTIFY_TOKEN_PIER_SELF_OPERATED}
INTERVAL_TIME: ${INTERVAL_TIME}
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
command: ["sh", "-c", "while true; do ./wait-for-it.sh db:5432 -- python main.py; sleep 60; done"]
crawler:
container_name: crawler
build: ./crawler
platform: linux/amd64
image: ghcr.io/jotpalch/portcdm-crawler
depends_on:
- notifier
restart: always
environment:
PYTHONUNBUFFERED: 1
INTERVAL_TIME: ${INTERVAL_TIME}
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- ./output:/app/output
command: ["sh", "-c", "while true; do python main.py; sleep 60; done"]
volumes:
postgres_data:
name: postgres_db