-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
155 lines (147 loc) · 4.13 KB
/
Copy pathdocker-compose.yml
File metadata and controls
155 lines (147 loc) · 4.13 KB
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
services:
store:
build:
context: .
dockerfile: Dockerfile
target: store
image: swift-shop-store:local
container_name: swift-shop-store
restart: unless-stopped
environment:
NODE_ENV: development
API_URL: ${API_URL:-http://localhost:3010}
GRAPHQL_URL: ${GRAPHQL_URL:-http://localhost:3010/graphql}
ports:
- '${DOCKER_PORT_STORE:-4210}:${PORT_STORE:-4200}'
depends_on:
api:
condition: service_started
networks:
- swift-shop-network
admin:
build:
context: .
dockerfile: Dockerfile
target: admin
image: swift-shop-admin:local
container_name: swift-shop-admin
restart: unless-stopped
environment:
NODE_ENV: development
API_URL: ${API_URL:-http://localhost:3010}
GRAPHQL_URL: ${GRAPHQL_URL:-http://localhost:3010/graphql}
ports:
- '${DOCKER_PORT_ADMIN:-4211}:${PORT_ADMIN:-4201}'
depends_on:
api:
condition: service_started
networks:
- swift-shop-network
prisma-studio:
build:
context: .
dockerfile: Dockerfile
target: prisma-studio
image: swift-shop-prisma-studio:local
container_name: swift-shop-prisma-studio
restart: unless-stopped
environment:
NODE_ENV: development
DATABASE_URL: postgresql://${POSTGRES_USER:-tahiry}:${POSTGRES_PASSWORD:-tahiry4534}@postgres:5432/${POSTGRES_DB:-swift_shop}?schema=public
ports:
- '${DOCKER_PORT_PRISMA_STUDIO:-5565}:5555'
depends_on:
postgres:
condition: service_healthy
networks:
- swift-shop-network
api:
build:
context: .
dockerfile: Dockerfile
target: api
image: swift-shop-api:local
container_name: swift-shop-api
restart: unless-stopped
environment:
NODE_ENV: production
PORT: ${PORT_API:-3000}
DATABASE_URL: postgresql://${POSTGRES_USER:-tahiry}:${POSTGRES_PASSWORD:-tahiry4534}@postgres:5432/${POSTGRES_DB:-swift_shop}?schema=public
JWT_SECRET: ${JWT_SECRET}
REDIS_URL: redis://redis:6379
MEILISEARCH_HOST: ${MEILISEARCH_HOST:-http://meilisearch:7700}
MEILISEARCH_API_KEY: ${MEILISEARCH_API_KEY:-masterKey}
ports:
- '${DOCKER_PORT_API:-3010}:${PORT_API:-3000}'
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
meilisearch:
condition: service_healthy
networks:
- swift-shop-network
redis:
image: redis:7-alpine
container_name: swift-shop-redis
restart: unless-stopped
ports:
- '${DOCKER_PORT_REDIS:-6389}:6379'
healthcheck:
test: [CMD, redis-cli, ping]
interval: 10s
timeout: 5s
retries: 5
networks:
- swift-shop-network
postgres:
image: postgres:16-alpine
container_name: swift-shop-postgres
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER:-tahiry}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-tahiry4534}
POSTGRES_DB: ${POSTGRES_DB:-swift_shop}
PGDATA: /var/lib/postgresql/data/pgdata
ports:
- '${DOCKER_PORT_POSTGRES:-5442}:5432'
volumes:
- swift-shop-postgres-data:/var/lib/postgresql/data
healthcheck:
test:
- CMD-SHELL
- pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}
interval: 10s
timeout: 5s
retries: 5
networks:
- swift-shop-network
meilisearch:
image: getmeili/meilisearch:v1.7
container_name: swift-shop-meilisearch
restart: unless-stopped
environment:
MEILI_MASTER_KEY: ${MEILISEARCH_API_KEY:-masterKey}
MEILI_NO_ANALYTICS: true
MEILI_ENV: development
ports:
- '${DOCKER_PORT_MEILISEARCH:-7710}:7700'
volumes:
- swift-shop-meilisearch-data:/meili_data
healthcheck:
test: [CMD, wget, -q, -O, -, http://localhost:7700/health]
interval: 10s
timeout: 5s
retries: 5
networks:
- swift-shop-network
volumes:
swift-shop-postgres-data:
name: swift-shop-postgres-data
swift-shop-meilisearch-data:
name: swift-shop-meilisearch-data
networks:
swift-shop-network:
name: swift-shop-network
driver: bridge