@contember/cli-common 1.0.0-rc.0 → 1.0.0-rc.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contember/cli-common",
3
- "version": "1.0.0-rc.0",
3
+ "version": "1.0.0-rc.4",
4
4
  "license": "Apache-2.0",
5
5
  "main": "dist/src/index.js",
6
6
  "typings": "dist/src/index.d.ts",
@@ -13,7 +13,7 @@
13
13
  "@types/npm-package-arg": "^6.1.0"
14
14
  },
15
15
  "dependencies": {
16
- "@contember/config-loader": "^1.0.0-rc.0",
16
+ "@contember/config-loader": "^1.0.0-rc.4",
17
17
  "chalk": "^4.1.0",
18
18
  "download-tarball": "^2.0.0",
19
19
  "fs-extra": "^10.0.0",
@@ -0,0 +1,3 @@
1
+ VITE_CONTEMBER_ADMIN_API_BASE_URL=http://localhost:1481
2
+ VITE_CONTEMBER_ADMIN_SESSION_TOKEN=0000000000000000000000000000000000000000
3
+ VITE_CONTEMBER_ADMIN_PROJECT_NAME={projectName}
@@ -2,7 +2,7 @@
2
2
  <html>
3
3
  <head>
4
4
  <meta charset="utf-8">
5
- <meta name="viewport" content="width=device-width">
5
+ <meta name="viewport" content="width=device-width, viewport-fit=cover">
6
6
  <title>Admin {projectName}</title>
7
7
  <script type="module" src="./index.tsx"></script>
8
8
  </head>
@@ -2,7 +2,7 @@ import * as React from 'react'
2
2
  import { GenericPage } from '@contember/admin'
3
3
 
4
4
  export const index = (
5
- <GenericPage pageName="index">
5
+ <GenericPage>
6
6
  Welcome to Contember Admin!
7
7
  </GenericPage>
8
8
  )
@@ -1,4 +1,5 @@
1
1
  type: project
2
2
  replaceVariables:
3
- - admin/index.tsx
3
+ - admin/.env
4
+ - admin/index.html
4
5
  - admin/components/Layout.tsx
@@ -3,7 +3,6 @@ remove:
3
3
  - package-lock.json
4
4
  patchPackageJson: true
5
5
  replaceVariables:
6
- - contember.yaml
7
6
  - package.json
8
7
  - docker-compose.yaml
9
8
 
@@ -1,25 +1,7 @@
1
1
  version: '2.4'
2
2
 
3
3
  services:
4
- admin:
5
- image: node:16-alpine
6
- command: 'npm run start-admin'
7
- user: '1000:1000'
8
-
9
- environment:
10
- VITE_PORT: '1480'
11
- VITE_CONTEMBER_ADMIN_API_BASE_URL: 'http://localhost:1481'
12
- VITE_CONTEMBER_ADMIN_SESSION_TOKEN: '0000000000000000000000000000000000000000'
13
- VITE_CONTEMBER_ADMIN_PROJECT_NAME: '{projectName}'
14
-
15
- ports:
16
- - '1480:1480' # ports must match
17
-
18
- working_dir: /src
19
- volumes:
20
- - ./:/src:cached
21
-
22
- engine:
4
+ contember-engine:
23
5
  image: contember/engine:{version}
24
6
 
25
7
  environment:
@@ -30,11 +12,7 @@ services:
30
12
  CONTEMBER_ROOT_PASSWORD: 'contember'
31
13
  CONTEMBER_ROOT_TOKEN: '0000000000000000000000000000000000000000' # openssl rand -hex 20
32
14
  CONTEMBER_LOGIN_TOKEN: '1111111111111111111111111111111111111111' # openssl rand -hex 20
33
-
34
- CONTEMBER_CONFIG_YAML: |
35
- projectDefaults:
36
- s3:
37
- prefix: '%project.slug%'
15
+ CONTEMBER_ENCRYPTION_KEY: "0000000000000000000000000000000000000000000000000000000000000000" #openssl rand -hex 32
38
16
 
39
17
  DEFAULT_DB_HOST: 'postgres'
40
18
  DEFAULT_DB_PORT: '5432'
@@ -69,27 +47,10 @@ services:
69
47
  contember-cli:
70
48
  image: contember/cli:{version}
71
49
  user: '1000:1000'
50
+ scale: 0
72
51
 
73
52
  environment:
74
- CONTEMBER_API_URL: 'http://engine:4000/'
75
- CONTEMBER_API_TOKEN: '0000000000000000000000000000000000000000'
76
- CONTEMBER_PROJECT_NAME: '{projectName}'
77
-
78
- working_dir: /src
79
- volumes:
80
- - ./:/src:cached
81
-
82
- depends_on:
83
- engine:
84
- condition: service_healthy
85
-
86
- contember-migrations:
87
- image: contember/cli:{version}
88
- command: 'migrations:execute . --yes'
89
- user: '1000:1000'
90
-
91
- environment:
92
- CONTEMBER_API_URL: 'http://engine:4000/'
53
+ CONTEMBER_API_URL: 'http://contember-engine:4000/'
93
54
  CONTEMBER_API_TOKEN: '0000000000000000000000000000000000000000'
94
55
  CONTEMBER_PROJECT_NAME: '{projectName}'
95
56
 
@@ -98,7 +59,7 @@ services:
98
59
  - ./:/src:cached
99
60
 
100
61
  depends_on:
101
- engine:
62
+ contember-engine:
102
63
  condition: service_healthy
103
64
 
104
65
  postgres:
@@ -122,20 +83,18 @@ services:
122
83
  retries: 10
123
84
 
124
85
  s3:
125
- image: minio/minio
126
- entrypoint: /minio/s3-entrypoint.sh
127
- command: 'server --address :1483 /data'
86
+ image: bitnami/minio
128
87
 
129
88
  environment:
130
89
  MINIO_ROOT_USER: 'contember'
131
90
  MINIO_ROOT_PASSWORD: 'contember'
91
+ MINIO_DEFAULT_BUCKETS: 'contember:download'
132
92
 
133
93
  ports:
134
- - '1483:1483' # ports must match
94
+ - '1483:9000'
135
95
 
136
96
  volumes:
137
97
  - s3-data:/data
138
- - ./docker/minio/:/minio
139
98
 
140
99
  mailhog:
141
100
  image: mailhog/mailhog
@@ -1,7 +1,9 @@
1
1
  {
2
2
  "scripts-template": {
3
3
  "contember": "docker-compose run contember-cli",
4
- "start-admin": "vite admin --port ${VITE_PORT:-4000} --host 0.0.0.0",
4
+ "start": "npm run start-engine && npm run start-admin",
5
+ "start-engine": "docker-compose up --detach && npm run contember migrations:execute . --yes",
6
+ "start-admin": "vite admin --port 1480 --host 0.0.0.0",
5
7
  "build-admin": "tsc && vite build admin"
6
8
  },
7
9
  "devDependencies": {
@@ -1,5 +0,0 @@
1
- api:
2
- version: {version}
3
-
4
- projects:
5
- {projectName}: .
@@ -1,8 +0,0 @@
1
- #!/bin/sh
2
- set -ex
3
-
4
- mkdir -p /data/contember
5
- mkdir -p /data/.minio.sys/buckets/contember/
6
- cp /minio/s3-policy.json /data/.minio.sys/buckets/contember/policy.json
7
-
8
- minio "$@"
@@ -1,34 +0,0 @@
1
- {
2
- "Version": "2012-10-17",
3
- "Statement": [
4
- {
5
- "Effect": "Allow",
6
- "Principal": {
7
- "AWS": [
8
- "*"
9
- ]
10
- },
11
- "Action": [
12
- "s3:GetBucketLocation",
13
- "s3:ListBucket"
14
- ],
15
- "Resource": [
16
- "arn:aws:s3:::contember"
17
- ]
18
- },
19
- {
20
- "Effect": "Allow",
21
- "Principal": {
22
- "AWS": [
23
- "*"
24
- ]
25
- },
26
- "Action": [
27
- "s3:GetObject"
28
- ],
29
- "Resource": [
30
- "arn:aws:s3:::contember/*"
31
- ]
32
- }
33
- ]
34
- }