-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.dev.yml
111 lines (111 loc) · 2.48 KB
/
docker-compose.dev.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
networks:
internal:
external: false
services:
db:
image: postgres
restart: always
environment:
POSTGRES_USER: blanket
POSTGRES_DB: blanket
POSTGRES_PASSWORD_FILE: /run/secrets/db_password
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
- ./db/init.sql:/docker-entrypoint-initdb.d/docker_postgres_init.sql
secrets:
- db_password
networks:
- internal
adminer:
image: adminer
restart: always
ports:
- 8084:8080
api:
depends_on:
- db
build:
context: api
dockerfile: Dockerfile.dev
args:
POETRY_VERSION: ${POETRY_VERSION}
API_PORT: ${API_PORT}
ports:
- "${API_PORT}:${API_PORT}"
environment:
API_ENV: dev
API_PORT: ${API_PORT}
ADMIN_USER: ${ADMIN_USER}
DB_HOST: db
DB_USER: blanket
DB_NAME: blanket
DB_PASSWORD: /run/secrets/db_password
ADMIN_PASSWORD_HASHED: /run/secrets/admin_password_hash
SECRET_KEY: /run/secrets/api_secret
volumes:
- ./api/src:/app/src
secrets:
- db_password
- admin_password_hash
- api_secret
networks:
- internal
daemon:
depends_on:
- api
build:
context: daemon
dockerfile: Dockerfile
args:
POETRY_VERSION: ${POETRY_VERSION}
DAY_CHECK: ${DAY_CHECK}
NIGHT_CHECK: ${NIGHT_CHECK}
environment:
ENV: dev
API_ENDPOINT: http://api:${API_PORT}
METOFFICE_SECRET: /run/secrets/metoffice_secret
API_USER: ${ADMIN_USER}
API_PASSWORD: /run/secrets/admin_password
STATION_ID: ${STATION_ID}
DAY_START: ${DAWN}
DAY_END: ${DUSK}
NIGHT_START: ${DUSK}
NIGHT_END: ${DAWN}
secrets:
- metoffice_secret
- admin_password
networks:
- internal
client:
build:
context: client
dockerfile: Dockerfile.dev
args:
API_URL: "http://api:${API_PORT}"
environment:
API_URL: "http://api:${API_PORT}"
CLIENT_PORT: ${CLIENT_PORT}
ports:
- "${CLIENT_PORT}:${CLIENT_PORT}"
depends_on:
- api
volumes:
- ./client:/app
- ./client/node_modules:/app/node_modules
networks:
- internal
secrets:
api_secret:
file: api-secret.txt
admin_password_hash:
file: admin-password-hash.txt
db_password:
file: db-password.txt
metoffice_secret:
file: metoffice-secret.txt
admin_password:
file: admin-password.txt
volumes:
pgdata: