Skip to content

Commit c6db535

Browse files
committed
feat: docker compose file
1 parent 0d2b0e3 commit c6db535

File tree

1 file changed

+19
-28
lines changed

1 file changed

+19
-28
lines changed

docker-compose.yml

Lines changed: 19 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
version: '3.7'
2+
name: metad-ocap-dev
23

34
volumes:
45
postgres_data:
@@ -48,23 +49,6 @@ services:
4849
networks:
4950
- overlay
5051

51-
# Clickhouse Database
52-
clickhouse:
53-
image: yandex/clickhouse-server
54-
mem_limit: 2048m
55-
ports:
56-
- 9000:9000
57-
- 8123:8123
58-
volumes:
59-
- clickhouse_data:/var/lib/clickhouse
60-
- ./.deploy/clickhouse/log:/var/log/clickhouse-server/
61-
ulimits:
62-
nofile:
63-
soft: 262144
64-
hard: 262144
65-
privileged: true
66-
networks:
67-
- overlay
6852

6953
redis:
7054
image: redis:6-alpine
@@ -78,12 +62,18 @@ services:
7862

7963
# OLAP Services
8064
olap:
81-
build:
82-
context: .
83-
dockerfile: ./.deploy/olap/Dockerfile
84-
target: webapp
65+
image: metadc/metad-olap:1.0.0
66+
# build:
67+
# context: .
68+
# dockerfile: ./.deploy/olap/Dockerfile
69+
# target: webapp
8570
mem_limit: 1024m
8671
restart: always
72+
healthcheck:
73+
test: curl -m 5 --silent --fail --request GET http://localhost:8080/ | jq --exit-status -n 'inputs | if has("status") then .status=="UP" else false end' > /dev/null || exit 1
74+
interval: 10s
75+
timeout: 2s
76+
retries: 10
8777
environment:
8878
REDIS_DATABASE: 1
8979
REDIS_HOST: "redis"
@@ -94,7 +84,7 @@ services:
9484

9585
api:
9686
container_name: api
97-
image: metadc/metad-api:latest
87+
# image: metadc/metad-api:latest
9888
build:
9989
context: .
10090
dockerfile: ./.deploy/api/Dockerfile
@@ -124,19 +114,19 @@ services:
124114
- db:${DB_HOST:-db}
125115
ports:
126116
- '3000:${API_PORT:-3000}'
117+
volumes:
118+
- ./.volumes/api/public:/srv/pangolin/public
127119
networks:
128120
- overlay
129121
webapp:
130122
container_name: webapp
131-
image: metadc/metad-webapp:latest
132123
build:
133124
context: .
134125
dockerfile: ./.deploy/webapp/Dockerfile
135126
target: production
136127
args:
137128
NODE_ENV: ${NODE_ENV:-development}
138129
API_BASE_URL: ${API_BASE_URL:-http://localhost:3000}
139-
CLIENT_BASE_URL: ${CLIENT_BASE_URL:-http://localhost:4200}
140130
SENTRY_DSN: ${SENTRY_DSN:-}
141131
CHATWOOT_SDK_TOKEN: ${CHATWOOT_SDK_TOKEN:-}
142132
CLOUDINARY_CLOUD_NAME: ${CLOUDINARY_CLOUD_NAME:-}
@@ -151,10 +141,8 @@ services:
151141
API_PORT: ${API_PORT:-3000}
152142
environment:
153143
HOST: ${WEB_HOST:-webapp}
154-
PORT: ${WEB_PORT:-4200}
155144
NODE_ENV: ${NODE_ENV:-development}
156145
API_BASE_URL: ${API_BASE_URL:-http://localhost:3000}
157-
CLIENT_BASE_URL: ${CLIENT_BASE_URL:-http://localhost:4200}
158146
SENTRY_DSN: ${SENTRY_DSN:-}
159147
CHATWOOT_SDK_TOKEN: ${CHATWOOT_SDK_TOKEN:-}
160148
CLOUDINARY_CLOUD_NAME: ${CLOUDINARY_CLOUD_NAME:-}
@@ -167,6 +155,7 @@ services:
167155
DEMO: 'true'
168156
API_HOST: ${API_HOST:-api}
169157
API_PORT: ${API_PORT:-3000}
158+
ENABLE_LOCAL_AGENT: false
170159
entrypoint: './entrypoint.compose.sh'
171160
command: ['nginx', '-g', 'daemon off;']
172161
env_file:
@@ -179,7 +168,9 @@ services:
179168
- db
180169
- api
181170
ports:
182-
- 4200:80
183-
- 4300:8080
171+
- 80:80
172+
# - 443:443
173+
volumes:
174+
- ./.volumes/webapp/:/webapp/
184175
networks:
185176
- overlay

0 commit comments

Comments
 (0)