-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.prod.yml
76 lines (70 loc) · 1.78 KB
/
docker-compose.prod.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
# Use postgres/example user/password credentials
version: "3.9"
services:
esphome:
image: esphome/esphome:2024.4
volumes:
- "${ESP_PATH}:/config"
- /etc/localtime:/etc/localtime:ro
- /dev/ttyUSB0:/dev/ttyUSB0
privileged: true
db:
image: postgres:16.3-alpine
shm_size: 128mb
volumes:
- "${DB_PATH}:/var/lib/postgresql/data"
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: memoires-info
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d memoires-info"]
interval: 10s
timeout: 5s
retries: 5
migration:
image: sqitch/sqitch:v1.4.1.1
environment:
SQITCH_TARGET: "db:pg://postgres:${POSTGRES_PASSWORD}@db:5432/memoires-info"
volumes:
- "./database/migration:/repo"
command:
- "deploy"
depends_on:
db:
condition: service_healthy
postg-rest:
image: postgrest/postgrest:v12.0.3
environment:
PGRST_JWT_SECRET: "${JWT_SECRET}"
PGRST_DB_URI: "postgres://postgres:${POSTGRES_PASSWORD}@db:5432/memoires-info"
PGRST_DB_ANO: role = "web_anon"
PGRST_DB_SCHEMAS: "api"
PGRST_OPENAPI_SERVE: proxy-uri = "http://0.0.0.0:3000"
depends_on:
migration:
condition: service_completed_successfully
php:
build:
context: .
dockerfile: Dockerfile/Php.Dockerfile
image: php-memoires-info
depends_on:
- postg-rest
interface:
build:
context: .
dockerfile: Dockerfile/Node.Dockerfile
image: interface-memoires-info
web:
build:
context: .
dockerfile: Dockerfile/Nginx.Dockerfile
image: nginx-memoires-info
ports:
- "80:80"
depends_on:
- php
- postg-rest
- esphome
- interface