-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdocker-compose.yml
79 lines (71 loc) · 1.88 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# Use postgres/example user/password credentials
version: '3.9'
services:
esphome:
image: esphome/esphome:2024.4
volumes:
- ./esp32/config:/config
- /etc/localtime:/etc/localtime:ro
- /dev/ttyUSB0:/dev/ttyUSB0
privileged: true
db:
image: postgres:16.3-alpine
shm_size: 128mb
volumes:
- "./database/data:/var/lib/postgresql/data"
- "./database/db.sql:/docker-entrypoint-initdb.d/db.sql"
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: example
POSTGRES_DB: memoires-info
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d memoires-info"]
interval: 10s
timeout: 5s
retries: 5
migration:
build:
context: .
dockerfile: Dockerfile.Sqitch
image: sqitch-memoires-info
environment:
SQITCH_TARGET: "db:pg://postgres:${POSTGRES_PASSWORD}@db:5432/memoires-info"
volumes:
- "./database/migration:/repo"
depends_on:
db:
condition: service_healthy
adminer:
image: adminer
depends_on:
- db
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:
image: php:8.3-fpm-alpine
volumes:
- ./login:/var/www/memoires-info/php
depends_on:
- postg-rest
web:
image: nginx:1.26-alpine-otel
ports:
- '80:80'
volumes:
- ./Interface/dist:/var/www/memoires-info/html
- ./nginx.conf:/etc/nginx/conf.d/default.conf
- ./login:/var/www/memoires-info/php
depends_on:
- php
- postg-rest
- adminer
- esphome