-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.example.yml
65 lines (61 loc) · 1.52 KB
/
docker-compose.example.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
version: "3"
services:
web:
image: ghcr.io/fedired-dev/fedired:latest
command: bash -c "npm install -g pnpm && pnpm install && npm start"
container_name: fedired_web
restart: unless-stopped
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
ports:
- "3000:3000"
networks:
- calcnet
environment:
NODE_ENV: production
NODE_OPTIONS: --max-old-space-size=3072
volumes:
# Monta todo el código fuente en el contenedor
- ./:/fedired
# Monta directorios específicos como volúmenes solo si son necesarios
- ./custom:/fedired/custom:ro
- ./files:/fedired/files
- ./.config:/fedired/.config:ro
healthcheck:
test: curl -f http://localhost:3000 || exit 1
interval: 5s
timeout: 5s
retries: 5
redis:
restart: unless-stopped
image: docker.io/redis:7.0-alpine
container_name: fedired_redis
networks:
- calcnet
volumes:
- ./redis:/data
healthcheck:
test: redis-cli ping
interval: 5s
timeout: 5s
retries: 5
db:
restart: unless-stopped
image: docker.io/groonga/pgroonga:3.1.8-alpine-16-slim
container_name: fedired_db
networks:
- calcnet
env_file:
- .config/docker.env
volumes:
- ./db:/var/lib/postgresql/data
healthcheck:
test: pg_isready --user="$${POSTGRES_USER}" --dbname="$${POSTGRES_DB}"
interval: 5s
timeout: 5s
retries: 5
networks:
calcnet: