Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
68 lines (67 loc) · 3.44 KB
/
Copy pathdocker-compose.yml
File metadata and controls
68 lines (67 loc) · 3.44 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
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
# SPDX-FileCopyrightText: 2021-present Arcade Data Ltd (info@arcadedata.com)
# SPDX-License-Identifier: Apache-2.0
# The `version` key is obsolete under Compose v2 and only produces a deprecation warning, so it is
# intentionally absent.
services:
arcade:
image: arcadedata/arcadedb:latest
ports:
- 2480:2480 # host : container port
environment:
# Database settings go in ARCADEDB_SETTINGS, never in JAVA_OPTS: the image parks its garbage
# collector selection in its own variable, but JAVA_OPTS is still the place for extra JVM
# flags, and Docker replaces an environment variable rather than appending to it. Keeping the
# two apart means a quickstart and a bare `docker run` produce the same JVM.
ARCADEDB_SETTINGS: >
-Darcadedb.server.rootPassword=playwithdata
-Darcadedb.dumpConfigAtStartup=true
-Darcadedb.server.defaultDatabases=Imported[root]{import:https://github.com/ArcadeData/arcadedb-datasets/raw/main/orientdb/OpenBeer.gz}
# One named volume per directory the image declares as a VOLUME. An unmounted one resolves to an
# anonymous volume, which `docker compose down -v`, `docker compose rm` or recreating the stack
# under another project name silently discards: for `databases` that is the imported database,
# for `config` every user, group and API token created at runtime (server-users.jsonl,
# server-groups.json, server-api-tokens.json). A named volume is seeded from the image the first
# time it is used, so `config` starts with the image's default files; later image upgrades do not
# refresh files already in the volume. For the same reason `rootPassword` above takes effect only
# on the first start: once server-users.jsonl holds the root user, change its password through the
# server (or remove the volume) rather than by editing the setting.
volumes:
- arcade_db_vol:/home/arcadedb/databases
- arcade_config_vol:/home/arcadedb/config
- arcade_backups_vol:/home/arcadedb/backups
- arcade_replication_vol:/home/arcadedb/replication
- arcade_log_vol:/home/arcadedb/log
# /api/v1/ready is the server's own unauthenticated readiness endpoint. Without a healthcheck a
# crash-looping container under `restart: always` still reports as "running". wget comes from the
# BusyBox base image, so no extra tooling is needed.
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://localhost:2480/api/v1/ready || exit 1"]
interval: 10s
timeout: 3s
retries: 12
start_period: 30s
restart: always
volumes:
arcade_db_vol:
arcade_config_vol:
arcade_backups_vol:
arcade_replication_vol:
arcade_log_vol:
networks:
default: