@cyaxis/ulvia 0.0.0-stage → 0.0.2

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.
@@ -0,0 +1,177 @@
1
+ services:
2
+ proxy:
3
+ image: nginxproxy/nginx-proxy:1.11.5@sha256:e06db5fb9586234e9c2bdef707c8b8d784caa4fb49fbe7285eb3730a501c3eaa
4
+ restart: unless-stopped
5
+ ports:
6
+ - "${ULVIA_BIND_ADDRESS}:${ULVIA_HTTP_PORT}:80"
7
+ volumes:
8
+ - /var/run/docker.sock:/tmp/docker.sock:ro
9
+ - ./nginx/client_max_body.conf:/etc/nginx/conf.d/zzz_client_max_body.conf:ro
10
+ - ./nginx/capability_cache.conf:/etc/nginx/conf.d/zzz_capability_cache.conf:ro
11
+ - ./nginx/query_safe_access_log.conf:/etc/nginx/conf.d/zzz_query_safe_access_log.conf:ro
12
+ - ./nginx/default_location:/etc/nginx/vhost.d/default_location:ro
13
+ - ${ULVIA_PROXY_CERTIFICATES_DIR}:/etc/nginx/certs
14
+ - ${ULVIA_PROXY_VHOST_DIR}:/etc/nginx/vhost.d
15
+ - ${ULVIA_PROXY_CHALLENGE_DIR}:/usr/share/nginx/html
16
+ - ${ULVIA_PROXY_ACME_DIR}:/etc/acme.sh
17
+ - proxy-cache:/var/cache/nginx
18
+ networks:
19
+ - instances
20
+ healthcheck:
21
+ test: ["CMD", "nginx", "-t"]
22
+ interval: 30s
23
+ timeout: 5s
24
+ retries: 3
25
+ start_period: 5s
26
+
27
+ mongo:
28
+ image: mongo:7.0.37@sha256:d5b3ca8c3f3cdce78d44870dc0871b76d5235e9b2ad4ea6bea5d1fbff8027703
29
+ restart: unless-stopped
30
+ user: "${ULVIA_UID}:${ULVIA_GID}"
31
+ environment:
32
+ MONGO_INITDB_ROOT_USERNAME: ${ULVIA_MONGO_USERNAME}
33
+ MONGO_INITDB_ROOT_PASSWORD: ${ULVIA_MONGO_PASSWORD}
34
+ volumes:
35
+ - type: bind
36
+ source: ${ULVIA_MONGO_DIR}
37
+ target: /data/db
38
+ networks:
39
+ - private
40
+ healthcheck:
41
+ test:
42
+ [
43
+ "CMD-SHELL",
44
+ "mongosh --quiet --username \"$$MONGO_INITDB_ROOT_USERNAME\" --password \"$$MONGO_INITDB_ROOT_PASSWORD\" --authenticationDatabase admin --eval 'quit(db.adminCommand({ ping: 1 }).ok ? 0 : 1)'",
45
+ ]
46
+ interval: 30s
47
+ timeout: 5s
48
+ retries: 3
49
+ start_period: 10s
50
+ stop_grace_period: 30s
51
+
52
+ repository:
53
+ image: ${OFFICIAL_REPOSITORY_IMAGE}
54
+ restart: unless-stopped
55
+ init: true
56
+ user: "${ULVIA_UID}:${ULVIA_GID}"
57
+ environment:
58
+ MODE: PROD
59
+ NODE_ENV: production
60
+ REPOSITORY_HOST: 0.0.0.0
61
+ REPOSITORY_PORT: "3000"
62
+ ULVIA_LOG_FILE: /var/log/ulvia/repository.ndjson
63
+ ULVIA_REPOSITORY_DIR: /var/lib/ulvia-repository
64
+ ULVIA_REPOSITORY_SEED_DIR: /opt/ulvia-repository-seed
65
+ ULVIA_REPOSITORY_TOKEN: ${ULVIA_REPOSITORY_TOKEN}
66
+ volumes:
67
+ - type: bind
68
+ source: ${ULVIA_REPOSITORY_DIR}
69
+ target: /var/lib/ulvia-repository
70
+ - type: bind
71
+ source: ${ULVIA_LOGS_DIR}
72
+ target: /var/log/ulvia
73
+ ports:
74
+ - "127.0.0.1:${ULVIA_REPOSITORY_PORT}:3000"
75
+ networks:
76
+ - private
77
+ read_only: true
78
+ tmpfs:
79
+ - /tmp:rw,nosuid,nodev,noexec,size=64m
80
+ cap_drop: [ALL]
81
+ security_opt: [no-new-privileges:true]
82
+ healthcheck:
83
+ test: ["CMD", "bun", "-e", "const r=await fetch('http://127.0.0.1:3000/readyz'); if(!r.ok) process.exit(1); await r.body?.cancel()"]
84
+ interval: 30s
85
+ timeout: 5s
86
+ retries: 3
87
+ start_period: 5s
88
+
89
+ mongo-provision:
90
+ image: mongo:7.0.37@sha256:d5b3ca8c3f3cdce78d44870dc0871b76d5235e9b2ad4ea6bea5d1fbff8027703
91
+ restart: "no"
92
+ environment:
93
+ MONGO_INITDB_ROOT_USERNAME: ${ULVIA_MONGO_USERNAME}
94
+ MONGO_INITDB_ROOT_PASSWORD: ${ULVIA_MONGO_PASSWORD}
95
+ MONGO_PROVIDER_USERNAME: ${ULVIA_MONGO_PROVIDER_USERNAME}
96
+ MONGO_PROVIDER_PASSWORD: ${ULVIA_MONGO_PROVIDER_PASSWORD}
97
+ entrypoint: ["/bin/sh", "-c"]
98
+ command:
99
+ - >-
100
+ exec mongosh --quiet --host mongo
101
+ --username "$$MONGO_INITDB_ROOT_USERNAME"
102
+ --password "$$MONGO_INITDB_ROOT_PASSWORD"
103
+ --authenticationDatabase admin
104
+ /opt/ulvia-mongo/provision-provider.js
105
+ volumes:
106
+ - ./mongo/provision-provider.js:/opt/ulvia-mongo/provision-provider.js:ro
107
+ networks:
108
+ - private
109
+ depends_on:
110
+ mongo:
111
+ condition: service_healthy
112
+ read_only: true
113
+ tmpfs:
114
+ - /tmp:rw,nosuid,nodev,noexec,size=32m
115
+ cap_drop: [ALL]
116
+ security_opt: [no-new-privileges:true]
117
+
118
+ provider:
119
+ image: ${PROVIDER_IMAGE}
120
+ restart: unless-stopped
121
+ init: true
122
+ user: "${ULVIA_UID}:${ULVIA_GID}"
123
+ environment:
124
+ MODE: PROD
125
+ NODE_ENV: production
126
+ CMS_FILES_DIR: /var/lib/cms/files
127
+ CMS_REPOSITORY_URL: http://repository:3000
128
+ CMS_REPOSITORY_ALLOW_INSECURE_HTTP: "true"
129
+ CMS_SESSION_SECRET: ${ULVIA_PROVIDER_SESSION_SECRET}
130
+ CMS_KEK_HEX: ${ULVIA_PROVIDER_KEK_HEX}
131
+ MONGO_URL: mongodb://${ULVIA_MONGO_PROVIDER_USERNAME}:${ULVIA_MONGO_PROVIDER_PASSWORD}@mongo:27017/ulvia_provider_control?authSource=admin&retryWrites=false
132
+ ULVIA_LOG_FILE: /var/log/ulvia/provider.ndjson
133
+ ULVIA_PROVIDER_HOST: 0.0.0.0
134
+ ULVIA_PROVIDER_PORT: "5103"
135
+ ULVIA_PROVIDER_PUBLIC_URL: http://ulvia-provider:5103
136
+ ULVIA_PROVIDER_OPERATOR_TOKEN: ${ULVIA_PROVIDER_OPERATOR_TOKEN}
137
+ volumes:
138
+ - type: bind
139
+ source: ${ULVIA_FILES_DIR}
140
+ target: /var/lib/cms/files
141
+ - type: bind
142
+ source: ${ULVIA_LOGS_DIR}
143
+ target: /var/log/ulvia
144
+ ports:
145
+ - "127.0.0.1:${ULVIA_PROVIDER_PORT}:5103"
146
+ networks:
147
+ private: {}
148
+ instances:
149
+ aliases:
150
+ - ulvia-provider
151
+ depends_on:
152
+ mongo-provision:
153
+ condition: service_completed_successfully
154
+ repository:
155
+ condition: service_healthy
156
+ read_only: true
157
+ tmpfs:
158
+ - /tmp:rw,nosuid,nodev,noexec,size=256m
159
+ cap_drop: [ALL]
160
+ security_opt: [no-new-privileges:true]
161
+ healthcheck:
162
+ test: ["CMD", "bun", "-e", "const r=await fetch('http://127.0.0.1:5103/ulvia/operator/instances',{headers:{authorization:'Bearer '+process.env.ULVIA_PROVIDER_OPERATOR_TOKEN}}); if(!r.ok) process.exit(1); await r.body?.cancel()"]
163
+ interval: 30s
164
+ timeout: 5s
165
+ retries: 3
166
+ start_period: 10s
167
+ stop_grace_period: 30s
168
+
169
+ networks:
170
+ private:
171
+ name: ${ULVIA_PRIVATE_NETWORK}
172
+ internal: true
173
+ instances:
174
+ name: ${ULVIA_INSTANCE_NETWORK}
175
+
176
+ volumes:
177
+ proxy-cache: