@seip/blue-bird 0.7.6 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env_example +34 -34
- package/AGENTS.md +174 -249
- package/LICENSE +21 -21
- package/README.md +331 -367
- package/{index.js → backend/index.js} +22 -30
- package/backend/routes/api.js +57 -57
- package/core/app.js +338 -402
- package/core/auth.js +262 -256
- package/core/cache.js +174 -174
- package/core/cli/docker.js +488 -457
- package/core/cli/init.js +333 -337
- package/core/cli/route.js +42 -42
- package/core/config.js +52 -52
- package/core/database.js +263 -263
- package/core/debug.js +248 -248
- package/core/logger.js +115 -115
- package/core/middleware.js +27 -27
- package/core/router.js +144 -144
- package/core/swagger.js +40 -40
- package/core/upload.js +77 -77
- package/core/validate.js +380 -380
- package/docker/Dockerfile +16 -16
- package/docker/docker-compose.dev.yml +6 -0
- package/docker/docker-compose.mysql.yml +92 -92
- package/docker/docker-compose.none.yml +68 -68
- package/docker/docker-compose.postgres.yml +93 -93
- package/docker/nginx.conf +98 -106
- package/docker-compose.yml +92 -92
- package/frontend/about.html +103 -0
- package/frontend/images/favicon.ico +0 -0
- package/frontend/index.html +141 -0
- package/frontend/js/tailwind.js +8 -0
- package/package.json +64 -71
- package/frontend/astro.config.mjs +0 -35
- package/frontend/public/css/app.css +0 -319
- package/frontend/public/favicon.ico +0 -0
- package/frontend/src/http/api.js +0 -29
- package/frontend/src/layouts/Layout.astro +0 -20
- package/frontend/src/pages/about.astro +0 -54
- package/frontend/src/pages/index.astro +0 -110
package/docker/Dockerfile
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
FROM node:24.7.0-alpine3.21
|
|
2
|
-
|
|
3
|
-
ENV NODE_ENV=production
|
|
4
|
-
|
|
5
|
-
WORKDIR /app
|
|
6
|
-
|
|
7
|
-
COPY package*.json ./
|
|
8
|
-
|
|
9
|
-
RUN npm ci --omit=dev && npm install -g pm2
|
|
10
|
-
|
|
11
|
-
COPY . .
|
|
12
|
-
|
|
13
|
-
EXPOSE 3000
|
|
14
|
-
|
|
15
|
-
CMD ["sh", "-c", "pm2-runtime start index.js -i ${PM2_INSTANCES:-1}"]
|
|
16
|
-
|
|
1
|
+
FROM node:24.7.0-alpine3.21
|
|
2
|
+
|
|
3
|
+
ENV NODE_ENV=production
|
|
4
|
+
|
|
5
|
+
WORKDIR /app
|
|
6
|
+
|
|
7
|
+
COPY package*.json ./
|
|
8
|
+
|
|
9
|
+
RUN npm ci --omit=dev && npm install -g pm2
|
|
10
|
+
|
|
11
|
+
COPY . .
|
|
12
|
+
|
|
13
|
+
EXPOSE 3000
|
|
14
|
+
|
|
15
|
+
CMD ["sh", "-c", "pm2-runtime start index.js -i ${PM2_INSTANCES:-1}"]
|
|
16
|
+
|
|
@@ -1,92 +1,92 @@
|
|
|
1
|
-
services:
|
|
2
|
-
app:
|
|
3
|
-
build:
|
|
4
|
-
context: .
|
|
5
|
-
dockerfile: docker/Dockerfile
|
|
6
|
-
container_name: ${TITLE:-bluebird}-app
|
|
7
|
-
restart: unless-stopped
|
|
8
|
-
expose:
|
|
9
|
-
- "3000"
|
|
10
|
-
volumes:
|
|
11
|
-
- .:/app
|
|
12
|
-
- /app/node_modules
|
|
13
|
-
env_file:
|
|
14
|
-
- .env
|
|
15
|
-
environment:
|
|
16
|
-
- NODE_ENV=production
|
|
17
|
-
- DEBUG=false
|
|
18
|
-
- DATABASE_URL=mysql://${DB_USER:-root}:${DB_PASSWORD:-root}@mysql:${DB_PORT:-3306}/${DB_NAME:-blue_bird}
|
|
19
|
-
- REDIS_HOST=redis
|
|
20
|
-
- REDIS_PORT=6379
|
|
21
|
-
- PORT=3000
|
|
22
|
-
depends_on:
|
|
23
|
-
mysql:
|
|
24
|
-
condition: service_healthy
|
|
25
|
-
redis:
|
|
26
|
-
condition: service_healthy
|
|
27
|
-
networks:
|
|
28
|
-
- bluebird_net
|
|
29
|
-
profiles:
|
|
30
|
-
- prod
|
|
31
|
-
|
|
32
|
-
nginx:
|
|
33
|
-
image: nginx:1.27-alpine
|
|
34
|
-
container_name: ${TITLE:-bluebird}-nginx
|
|
35
|
-
restart: unless-stopped
|
|
36
|
-
ports:
|
|
37
|
-
- "${PORT:-3000}:80"
|
|
38
|
-
volumes:
|
|
39
|
-
- .:/app:ro
|
|
40
|
-
- ./docker/nginx.conf:/etc/nginx/nginx.conf:ro
|
|
41
|
-
depends_on:
|
|
42
|
-
app:
|
|
43
|
-
condition: service_started
|
|
44
|
-
networks:
|
|
45
|
-
- bluebird_net
|
|
46
|
-
profiles:
|
|
47
|
-
- prod
|
|
48
|
-
|
|
49
|
-
mysql:
|
|
50
|
-
image: mysql:8.0
|
|
51
|
-
container_name: ${TITLE:-bluebird}-mysql
|
|
52
|
-
restart: unless-stopped
|
|
53
|
-
environment:
|
|
54
|
-
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD:-root}
|
|
55
|
-
MYSQL_DATABASE: ${DB_NAME:-blue_bird}
|
|
56
|
-
ports:
|
|
57
|
-
- "${DB_PORT:-3306}:3306"
|
|
58
|
-
volumes:
|
|
59
|
-
- mysql_data:/var/lib/mysql
|
|
60
|
-
healthcheck:
|
|
61
|
-
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-p${DB_PASSWORD:-root}"]
|
|
62
|
-
interval: 10s
|
|
63
|
-
timeout: 5s
|
|
64
|
-
retries: 5
|
|
65
|
-
start_period: 30s
|
|
66
|
-
networks:
|
|
67
|
-
- bluebird_net
|
|
68
|
-
|
|
69
|
-
redis:
|
|
70
|
-
image: redis:7-alpine
|
|
71
|
-
container_name: ${TITLE:-bluebird}-redis
|
|
72
|
-
restart: unless-stopped
|
|
73
|
-
ports:
|
|
74
|
-
- "${REDIS_PORT:-6379}:6379"
|
|
75
|
-
volumes:
|
|
76
|
-
- redis_data:/data
|
|
77
|
-
networks:
|
|
78
|
-
- bluebird_net
|
|
79
|
-
healthcheck:
|
|
80
|
-
test: ["CMD", "redis-cli", "ping"]
|
|
81
|
-
interval: 5s
|
|
82
|
-
timeout: 3s
|
|
83
|
-
retries: 5
|
|
84
|
-
|
|
85
|
-
volumes:
|
|
86
|
-
mysql_data:
|
|
87
|
-
redis_data:
|
|
88
|
-
|
|
89
|
-
networks:
|
|
90
|
-
bluebird_net:
|
|
91
|
-
name: ${TITLE:-bluebird}_network
|
|
92
|
-
driver: bridge
|
|
1
|
+
services:
|
|
2
|
+
app:
|
|
3
|
+
build:
|
|
4
|
+
context: .
|
|
5
|
+
dockerfile: docker/Dockerfile
|
|
6
|
+
container_name: ${TITLE:-bluebird}-app
|
|
7
|
+
restart: unless-stopped
|
|
8
|
+
expose:
|
|
9
|
+
- "3000"
|
|
10
|
+
volumes:
|
|
11
|
+
- .:/app
|
|
12
|
+
- /app/node_modules
|
|
13
|
+
env_file:
|
|
14
|
+
- .env
|
|
15
|
+
environment:
|
|
16
|
+
- NODE_ENV=production
|
|
17
|
+
- DEBUG=false
|
|
18
|
+
- DATABASE_URL=mysql://${DB_USER:-root}:${DB_PASSWORD:-root}@mysql:${DB_PORT:-3306}/${DB_NAME:-blue_bird}
|
|
19
|
+
- REDIS_HOST=redis
|
|
20
|
+
- REDIS_PORT=6379
|
|
21
|
+
- PORT=3000
|
|
22
|
+
depends_on:
|
|
23
|
+
mysql:
|
|
24
|
+
condition: service_healthy
|
|
25
|
+
redis:
|
|
26
|
+
condition: service_healthy
|
|
27
|
+
networks:
|
|
28
|
+
- bluebird_net
|
|
29
|
+
profiles:
|
|
30
|
+
- prod
|
|
31
|
+
|
|
32
|
+
nginx:
|
|
33
|
+
image: nginx:1.27-alpine
|
|
34
|
+
container_name: ${TITLE:-bluebird}-nginx
|
|
35
|
+
restart: unless-stopped
|
|
36
|
+
ports:
|
|
37
|
+
- "${PORT:-3000}:80"
|
|
38
|
+
volumes:
|
|
39
|
+
- .:/app:ro
|
|
40
|
+
- ./docker/nginx.conf:/etc/nginx/nginx.conf:ro
|
|
41
|
+
depends_on:
|
|
42
|
+
app:
|
|
43
|
+
condition: service_started
|
|
44
|
+
networks:
|
|
45
|
+
- bluebird_net
|
|
46
|
+
profiles:
|
|
47
|
+
- prod
|
|
48
|
+
|
|
49
|
+
mysql:
|
|
50
|
+
image: mysql:8.0
|
|
51
|
+
container_name: ${TITLE:-bluebird}-mysql
|
|
52
|
+
restart: unless-stopped
|
|
53
|
+
environment:
|
|
54
|
+
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD:-root}
|
|
55
|
+
MYSQL_DATABASE: ${DB_NAME:-blue_bird}
|
|
56
|
+
ports:
|
|
57
|
+
- "${DB_PORT:-3306}:3306"
|
|
58
|
+
volumes:
|
|
59
|
+
- mysql_data:/var/lib/mysql
|
|
60
|
+
healthcheck:
|
|
61
|
+
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-p${DB_PASSWORD:-root}"]
|
|
62
|
+
interval: 10s
|
|
63
|
+
timeout: 5s
|
|
64
|
+
retries: 5
|
|
65
|
+
start_period: 30s
|
|
66
|
+
networks:
|
|
67
|
+
- bluebird_net
|
|
68
|
+
|
|
69
|
+
redis:
|
|
70
|
+
image: redis:7-alpine
|
|
71
|
+
container_name: ${TITLE:-bluebird}-redis
|
|
72
|
+
restart: unless-stopped
|
|
73
|
+
ports:
|
|
74
|
+
- "${REDIS_PORT:-6379}:6379"
|
|
75
|
+
volumes:
|
|
76
|
+
- redis_data:/data
|
|
77
|
+
networks:
|
|
78
|
+
- bluebird_net
|
|
79
|
+
healthcheck:
|
|
80
|
+
test: ["CMD", "redis-cli", "ping"]
|
|
81
|
+
interval: 5s
|
|
82
|
+
timeout: 3s
|
|
83
|
+
retries: 5
|
|
84
|
+
|
|
85
|
+
volumes:
|
|
86
|
+
mysql_data:
|
|
87
|
+
redis_data:
|
|
88
|
+
|
|
89
|
+
networks:
|
|
90
|
+
bluebird_net:
|
|
91
|
+
name: ${TITLE:-bluebird}_network
|
|
92
|
+
driver: bridge
|
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
services:
|
|
2
|
-
app:
|
|
3
|
-
build:
|
|
4
|
-
context: .
|
|
5
|
-
dockerfile: docker/Dockerfile
|
|
6
|
-
container_name: ${TITLE:-bluebird}-app
|
|
7
|
-
restart: unless-stopped
|
|
8
|
-
expose:
|
|
9
|
-
- "3000"
|
|
10
|
-
volumes:
|
|
11
|
-
- .:/app
|
|
12
|
-
- /app/node_modules
|
|
13
|
-
env_file:
|
|
14
|
-
- .env
|
|
15
|
-
environment:
|
|
16
|
-
- NODE_ENV=production
|
|
17
|
-
- DEBUG=false
|
|
18
|
-
- REDIS_HOST=redis
|
|
19
|
-
- REDIS_PORT=6379
|
|
20
|
-
- PORT=3000
|
|
21
|
-
depends_on:
|
|
22
|
-
redis:
|
|
23
|
-
condition: service_healthy
|
|
24
|
-
networks:
|
|
25
|
-
- bluebird_net
|
|
26
|
-
profiles:
|
|
27
|
-
- prod
|
|
28
|
-
|
|
29
|
-
nginx:
|
|
30
|
-
image: nginx:1.27-alpine
|
|
31
|
-
container_name: ${TITLE:-bluebird}-nginx
|
|
32
|
-
restart: unless-stopped
|
|
33
|
-
ports:
|
|
34
|
-
- "${PORT:-3000}:80"
|
|
35
|
-
volumes:
|
|
36
|
-
- .:/app:ro
|
|
37
|
-
- ./docker/nginx.conf:/etc/nginx/nginx.conf:ro
|
|
38
|
-
depends_on:
|
|
39
|
-
app:
|
|
40
|
-
condition: service_started
|
|
41
|
-
networks:
|
|
42
|
-
- bluebird_net
|
|
43
|
-
profiles:
|
|
44
|
-
- prod
|
|
45
|
-
|
|
46
|
-
redis:
|
|
47
|
-
image: redis:7-alpine
|
|
48
|
-
container_name: ${TITLE:-bluebird}-redis
|
|
49
|
-
restart: unless-stopped
|
|
50
|
-
ports:
|
|
51
|
-
- "${REDIS_PORT:-6379}:6379"
|
|
52
|
-
volumes:
|
|
53
|
-
- redis_data:/data
|
|
54
|
-
networks:
|
|
55
|
-
- bluebird_net
|
|
56
|
-
healthcheck:
|
|
57
|
-
test: ["CMD", "redis-cli", "ping"]
|
|
58
|
-
interval: 5s
|
|
59
|
-
timeout: 3s
|
|
60
|
-
retries: 5
|
|
61
|
-
|
|
62
|
-
volumes:
|
|
63
|
-
redis_data:
|
|
64
|
-
|
|
65
|
-
networks:
|
|
66
|
-
bluebird_net:
|
|
67
|
-
name: ${TITLE:-bluebird}_network
|
|
68
|
-
driver: bridge
|
|
1
|
+
services:
|
|
2
|
+
app:
|
|
3
|
+
build:
|
|
4
|
+
context: .
|
|
5
|
+
dockerfile: docker/Dockerfile
|
|
6
|
+
container_name: ${TITLE:-bluebird}-app
|
|
7
|
+
restart: unless-stopped
|
|
8
|
+
expose:
|
|
9
|
+
- "3000"
|
|
10
|
+
volumes:
|
|
11
|
+
- .:/app
|
|
12
|
+
- /app/node_modules
|
|
13
|
+
env_file:
|
|
14
|
+
- .env
|
|
15
|
+
environment:
|
|
16
|
+
- NODE_ENV=production
|
|
17
|
+
- DEBUG=false
|
|
18
|
+
- REDIS_HOST=redis
|
|
19
|
+
- REDIS_PORT=6379
|
|
20
|
+
- PORT=3000
|
|
21
|
+
depends_on:
|
|
22
|
+
redis:
|
|
23
|
+
condition: service_healthy
|
|
24
|
+
networks:
|
|
25
|
+
- bluebird_net
|
|
26
|
+
profiles:
|
|
27
|
+
- prod
|
|
28
|
+
|
|
29
|
+
nginx:
|
|
30
|
+
image: nginx:1.27-alpine
|
|
31
|
+
container_name: ${TITLE:-bluebird}-nginx
|
|
32
|
+
restart: unless-stopped
|
|
33
|
+
ports:
|
|
34
|
+
- "${PORT:-3000}:80"
|
|
35
|
+
volumes:
|
|
36
|
+
- .:/app:ro
|
|
37
|
+
- ./docker/nginx.conf:/etc/nginx/nginx.conf:ro
|
|
38
|
+
depends_on:
|
|
39
|
+
app:
|
|
40
|
+
condition: service_started
|
|
41
|
+
networks:
|
|
42
|
+
- bluebird_net
|
|
43
|
+
profiles:
|
|
44
|
+
- prod
|
|
45
|
+
|
|
46
|
+
redis:
|
|
47
|
+
image: redis:7-alpine
|
|
48
|
+
container_name: ${TITLE:-bluebird}-redis
|
|
49
|
+
restart: unless-stopped
|
|
50
|
+
ports:
|
|
51
|
+
- "${REDIS_PORT:-6379}:6379"
|
|
52
|
+
volumes:
|
|
53
|
+
- redis_data:/data
|
|
54
|
+
networks:
|
|
55
|
+
- bluebird_net
|
|
56
|
+
healthcheck:
|
|
57
|
+
test: ["CMD", "redis-cli", "ping"]
|
|
58
|
+
interval: 5s
|
|
59
|
+
timeout: 3s
|
|
60
|
+
retries: 5
|
|
61
|
+
|
|
62
|
+
volumes:
|
|
63
|
+
redis_data:
|
|
64
|
+
|
|
65
|
+
networks:
|
|
66
|
+
bluebird_net:
|
|
67
|
+
name: ${TITLE:-bluebird}_network
|
|
68
|
+
driver: bridge
|
|
@@ -1,93 +1,93 @@
|
|
|
1
|
-
services:
|
|
2
|
-
app:
|
|
3
|
-
build:
|
|
4
|
-
context: .
|
|
5
|
-
dockerfile: docker/Dockerfile
|
|
6
|
-
container_name: ${TITLE:-bluebird}-app
|
|
7
|
-
restart: unless-stopped
|
|
8
|
-
expose:
|
|
9
|
-
- "3000"
|
|
10
|
-
volumes:
|
|
11
|
-
- .:/app
|
|
12
|
-
- /app/node_modules
|
|
13
|
-
env_file:
|
|
14
|
-
- .env
|
|
15
|
-
environment:
|
|
16
|
-
- NODE_ENV=production
|
|
17
|
-
- DEBUG=false
|
|
18
|
-
- DATABASE_URL=postgresql://${DB_USER:-postgres}:${DB_PASSWORD:-root}@postgres:${DB_PORT:-5432}/${DB_NAME:-blue_bird}?schema=public
|
|
19
|
-
- REDIS_HOST=redis
|
|
20
|
-
- REDIS_PORT=6379
|
|
21
|
-
- PORT=3000
|
|
22
|
-
depends_on:
|
|
23
|
-
postgres:
|
|
24
|
-
condition: service_healthy
|
|
25
|
-
redis:
|
|
26
|
-
condition: service_healthy
|
|
27
|
-
networks:
|
|
28
|
-
- bluebird_net
|
|
29
|
-
profiles:
|
|
30
|
-
- prod
|
|
31
|
-
|
|
32
|
-
nginx:
|
|
33
|
-
image: nginx:1.27-alpine
|
|
34
|
-
container_name: ${TITLE:-bluebird}-nginx
|
|
35
|
-
restart: unless-stopped
|
|
36
|
-
ports:
|
|
37
|
-
- "${PORT:-3000}:80"
|
|
38
|
-
volumes:
|
|
39
|
-
- .:/app:ro
|
|
40
|
-
- ./docker/nginx.conf:/etc/nginx/nginx.conf:ro
|
|
41
|
-
depends_on:
|
|
42
|
-
app:
|
|
43
|
-
condition: service_started
|
|
44
|
-
networks:
|
|
45
|
-
- bluebird_net
|
|
46
|
-
profiles:
|
|
47
|
-
- prod
|
|
48
|
-
|
|
49
|
-
postgres:
|
|
50
|
-
image: postgres:18-alpine
|
|
51
|
-
container_name: ${TITLE:-bluebird}-postgres
|
|
52
|
-
restart: unless-stopped
|
|
53
|
-
environment:
|
|
54
|
-
POSTGRES_USER: ${DB_USER:-postgres}
|
|
55
|
-
POSTGRES_PASSWORD: ${DB_PASSWORD:-root}
|
|
56
|
-
POSTGRES_DB: ${DB_NAME:-blue_bird}
|
|
57
|
-
ports:
|
|
58
|
-
- "${DB_PORT:-5432}:5432"
|
|
59
|
-
volumes:
|
|
60
|
-
- postgres_data:/var/lib/postgresql
|
|
61
|
-
healthcheck:
|
|
62
|
-
test: ["CMD-SHELL", "pg_isready -U ${DB_USER:-postgres} -d ${DB_NAME:-blue_bird}"]
|
|
63
|
-
interval: 10s
|
|
64
|
-
timeout: 5s
|
|
65
|
-
retries: 5
|
|
66
|
-
start_period: 30s
|
|
67
|
-
networks:
|
|
68
|
-
- bluebird_net
|
|
69
|
-
|
|
70
|
-
redis:
|
|
71
|
-
image: redis:7-alpine
|
|
72
|
-
container_name: ${TITLE:-bluebird}-redis
|
|
73
|
-
restart: unless-stopped
|
|
74
|
-
ports:
|
|
75
|
-
- "${REDIS_PORT:-6379}:6379"
|
|
76
|
-
volumes:
|
|
77
|
-
- redis_data:/data
|
|
78
|
-
networks:
|
|
79
|
-
- bluebird_net
|
|
80
|
-
healthcheck:
|
|
81
|
-
test: ["CMD", "redis-cli", "ping"]
|
|
82
|
-
interval: 5s
|
|
83
|
-
timeout: 3s
|
|
84
|
-
retries: 5
|
|
85
|
-
|
|
86
|
-
volumes:
|
|
87
|
-
postgres_data:
|
|
88
|
-
redis_data:
|
|
89
|
-
|
|
90
|
-
networks:
|
|
91
|
-
bluebird_net:
|
|
92
|
-
name: ${TITLE:-bluebird}_network
|
|
93
|
-
driver: bridge
|
|
1
|
+
services:
|
|
2
|
+
app:
|
|
3
|
+
build:
|
|
4
|
+
context: .
|
|
5
|
+
dockerfile: docker/Dockerfile
|
|
6
|
+
container_name: ${TITLE:-bluebird}-app
|
|
7
|
+
restart: unless-stopped
|
|
8
|
+
expose:
|
|
9
|
+
- "3000"
|
|
10
|
+
volumes:
|
|
11
|
+
- .:/app
|
|
12
|
+
- /app/node_modules
|
|
13
|
+
env_file:
|
|
14
|
+
- .env
|
|
15
|
+
environment:
|
|
16
|
+
- NODE_ENV=production
|
|
17
|
+
- DEBUG=false
|
|
18
|
+
- DATABASE_URL=postgresql://${DB_USER:-postgres}:${DB_PASSWORD:-root}@postgres:${DB_PORT:-5432}/${DB_NAME:-blue_bird}?schema=public
|
|
19
|
+
- REDIS_HOST=redis
|
|
20
|
+
- REDIS_PORT=6379
|
|
21
|
+
- PORT=3000
|
|
22
|
+
depends_on:
|
|
23
|
+
postgres:
|
|
24
|
+
condition: service_healthy
|
|
25
|
+
redis:
|
|
26
|
+
condition: service_healthy
|
|
27
|
+
networks:
|
|
28
|
+
- bluebird_net
|
|
29
|
+
profiles:
|
|
30
|
+
- prod
|
|
31
|
+
|
|
32
|
+
nginx:
|
|
33
|
+
image: nginx:1.27-alpine
|
|
34
|
+
container_name: ${TITLE:-bluebird}-nginx
|
|
35
|
+
restart: unless-stopped
|
|
36
|
+
ports:
|
|
37
|
+
- "${PORT:-3000}:80"
|
|
38
|
+
volumes:
|
|
39
|
+
- .:/app:ro
|
|
40
|
+
- ./docker/nginx.conf:/etc/nginx/nginx.conf:ro
|
|
41
|
+
depends_on:
|
|
42
|
+
app:
|
|
43
|
+
condition: service_started
|
|
44
|
+
networks:
|
|
45
|
+
- bluebird_net
|
|
46
|
+
profiles:
|
|
47
|
+
- prod
|
|
48
|
+
|
|
49
|
+
postgres:
|
|
50
|
+
image: postgres:18-alpine
|
|
51
|
+
container_name: ${TITLE:-bluebird}-postgres
|
|
52
|
+
restart: unless-stopped
|
|
53
|
+
environment:
|
|
54
|
+
POSTGRES_USER: ${DB_USER:-postgres}
|
|
55
|
+
POSTGRES_PASSWORD: ${DB_PASSWORD:-root}
|
|
56
|
+
POSTGRES_DB: ${DB_NAME:-blue_bird}
|
|
57
|
+
ports:
|
|
58
|
+
- "${DB_PORT:-5432}:5432"
|
|
59
|
+
volumes:
|
|
60
|
+
- postgres_data:/var/lib/postgresql
|
|
61
|
+
healthcheck:
|
|
62
|
+
test: ["CMD-SHELL", "pg_isready -U ${DB_USER:-postgres} -d ${DB_NAME:-blue_bird}"]
|
|
63
|
+
interval: 10s
|
|
64
|
+
timeout: 5s
|
|
65
|
+
retries: 5
|
|
66
|
+
start_period: 30s
|
|
67
|
+
networks:
|
|
68
|
+
- bluebird_net
|
|
69
|
+
|
|
70
|
+
redis:
|
|
71
|
+
image: redis:7-alpine
|
|
72
|
+
container_name: ${TITLE:-bluebird}-redis
|
|
73
|
+
restart: unless-stopped
|
|
74
|
+
ports:
|
|
75
|
+
- "${REDIS_PORT:-6379}:6379"
|
|
76
|
+
volumes:
|
|
77
|
+
- redis_data:/data
|
|
78
|
+
networks:
|
|
79
|
+
- bluebird_net
|
|
80
|
+
healthcheck:
|
|
81
|
+
test: ["CMD", "redis-cli", "ping"]
|
|
82
|
+
interval: 5s
|
|
83
|
+
timeout: 3s
|
|
84
|
+
retries: 5
|
|
85
|
+
|
|
86
|
+
volumes:
|
|
87
|
+
postgres_data:
|
|
88
|
+
redis_data:
|
|
89
|
+
|
|
90
|
+
networks:
|
|
91
|
+
bluebird_net:
|
|
92
|
+
name: ${TITLE:-bluebird}_network
|
|
93
|
+
driver: bridge
|