qcobjects 2.4.98 → 2.4.99
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/Dockerfile +14 -57
- package/QCOBJECTS-DOCKER-README.md +202 -0
- package/VERSION +1 -1
- package/package.json +1 -1
package/Dockerfile
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
FROM
|
|
1
|
+
FROM alpine/git:latest
|
|
2
|
+
FROM alpine/openssl
|
|
3
|
+
FROM certbot/certbot
|
|
4
|
+
FROM docker/extension-npm-installer
|
|
5
|
+
FROM --platform=$BUILDPLATFORM node:lts-alpine as builder
|
|
6
|
+
|
|
2
7
|
###
|
|
3
|
-
# QCObjects
|
|
8
|
+
# QCObjects 2.4
|
|
4
9
|
# ________________
|
|
5
10
|
#
|
|
6
11
|
# Author: Jean Machuca <correojean@gmail.com>
|
|
@@ -24,54 +29,26 @@ FROM node:lts
|
|
|
24
29
|
# license document, but changing it is not allowed.
|
|
25
30
|
###
|
|
26
31
|
|
|
27
|
-
LABEL org.quickcorp.qcobjects.cli.version="
|
|
32
|
+
LABEL org.quickcorp.qcobjects.cli.version="2.4.62"
|
|
28
33
|
LABEL vendor1="QuickCorp"
|
|
29
34
|
LABEL vendor2="QCObjects"
|
|
30
35
|
LABEL org.quickcorp.qcobjects.release-date="2019-06-01"
|
|
31
36
|
LABEL org.quickcorp.qcobjects.version.is-production=""
|
|
32
37
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
RUN
|
|
36
|
-
DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
|
37
|
-
openssl \
|
|
38
|
-
&& apt-get clean
|
|
39
|
-
# End Install Openssl
|
|
40
|
-
|
|
41
|
-
# Installation of certbot
|
|
42
|
-
USER root
|
|
43
|
-
RUN apt-get update && apt-get install -y --no-install-recommends apt-utils
|
|
44
|
-
RUN apt-get -y install software-properties-common
|
|
45
|
-
RUN sed -i "/^# deb.*universe/ s/^# //" /etc/apt/sources.list
|
|
46
|
-
RUN add-apt-repository ppa:certbot/certbot
|
|
47
|
-
RUN apt-get -y install certbot
|
|
48
|
-
# End Installation of certbot
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
RUN npm install -g jasmine --only=production
|
|
52
|
-
RUN npm install -g qcobjects-sdk --only=production
|
|
53
|
-
RUN npm install -g qcobjects-cli --only=production
|
|
54
|
-
|
|
55
|
-
# QCObjects Service
|
|
56
|
-
RUN apt-get -y install --reinstall systemd
|
|
57
|
-
COPY bin/install/ubuntu18/etc/systemd/system/qcobjects.service /etc/systemd/system/qcobjects.service
|
|
58
|
-
# End QCObjects Service
|
|
38
|
+
RUN npm install -g npm@latest
|
|
39
|
+
RUN npm config set legacy-peer-deps true --global
|
|
40
|
+
RUN npm install -g qcobjects qcobjects-sdk qcobjects-cli
|
|
59
41
|
|
|
60
42
|
RUN mkdir -p /etc/letsencrypt/live/
|
|
61
43
|
RUN mkdir -p /etc/letsencrypt/live/mynewapp.qcobjects.com/
|
|
62
44
|
RUN chmod 775 /etc/letsencrypt/live/
|
|
63
45
|
RUN chmod 777 /etc/letsencrypt/live/mynewapp.qcobjects.com/
|
|
64
46
|
|
|
65
|
-
RUN
|
|
47
|
+
RUN addgroup -S qcobjects && adduser -s /bin/bash -S qcobjects -G qcobjects
|
|
66
48
|
RUN mkdir -p /home/qcobjects && chown -R qcobjects:qcobjects /home/qcobjects
|
|
67
49
|
|
|
68
|
-
RUN mkdir -p /etc/qcobjects
|
|
69
|
-
RUN
|
|
70
|
-
RUN chmod +w /home/qcobjects/projects/mynewapp/
|
|
71
|
-
COPY bin/install/ubuntu18/etc/qcobjects/config.json.template /etc/qcobjects/config.json
|
|
72
|
-
RUN (cd /etc/qcobjects/ && npm install qcobjects-sdk --save && qcobjects-createcert)
|
|
73
|
-
RUN (cd /home/qcobjects/projects/mynewapp && npm install qcobjects-sdk --save)
|
|
74
|
-
RUN (cd /home/qcobjects/projects/mynewapp && (qcobjects-createcert && echo "\n" | (qcobjects create --pwa app 2>&1 >/dev/null)))
|
|
50
|
+
RUN mkdir -p /etc/qcobjects
|
|
51
|
+
RUN chmod +w /home/qcobjects
|
|
75
52
|
|
|
76
53
|
RUN echo "Welcome to... "
|
|
77
54
|
RUN echo ""
|
|
@@ -87,31 +64,11 @@ RUN echo " Y8b 888"
|
|
|
87
64
|
RUN echo " d88P"
|
|
88
65
|
RUN echo " 888P"
|
|
89
66
|
RUN echo ""
|
|
90
|
-
RUN echo "To start, use: su - qcobjects"
|
|
91
|
-
RUN echo "and go to the path ~/projects/mynewapp"
|
|
92
|
-
RUN echo ""
|
|
93
|
-
RUN echo "To create a new progressive web app type: "
|
|
94
|
-
RUN echo "> qcobjects create mynewapp --pwa"
|
|
95
|
-
RUN echo ""
|
|
96
|
-
RUN echo "To create an accelerated mobile page type: "
|
|
97
|
-
RUN echo "> qcobjects create mynewapp --amp"
|
|
98
|
-
RUN echo ""
|
|
99
|
-
RUN echo "The QCObjects HTTP2 Server Settings file is in: "
|
|
100
|
-
RUN echo "/etc/qcobjects/config.json"
|
|
101
|
-
RUN echo ""
|
|
102
|
-
RUN echo "To check the status of the service:"
|
|
103
|
-
RUN echo "> service qcobjects status"
|
|
104
|
-
RUN echo ""
|
|
105
|
-
RUN echo "To start|stop|prestart the service:"
|
|
106
|
-
RUN echo "> service qcobjects start"
|
|
107
|
-
RUN echo "> service qcobjects stop"
|
|
108
|
-
RUN echo "> service qcobjects restart"
|
|
109
67
|
RUN echo ""
|
|
110
68
|
|
|
111
69
|
WORKDIR /home/qcobjects
|
|
112
70
|
USER qcobjects
|
|
113
71
|
COPY package*.json ./
|
|
114
|
-
RUN jasmine init
|
|
115
72
|
RUN npm cache verify
|
|
116
73
|
RUN npm ci --save --only=production
|
|
117
74
|
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
# QCObjects Docker Image Overview
|
|
2
|
+
|
|
3
|
+
The QCObjects Docker image (qcobjects/qcobjects) provides a streamlined environment for developing and deploying applications using the QCObjects framework. This image includes all necessary dependencies and tools to get started quickly.
|
|
4
|
+
Key Features:
|
|
5
|
+
- Base Images: Utilizes alpine/git, alpine/openssl, certbot/certbot, and docker/extension-npm-installer for a lightweight and secure foundation.
|
|
6
|
+
- Node.js Environment: Built on node:lts-alpine to ensure compatibility with the latest long-term support version of Node.js.
|
|
7
|
+
- QCObjects Tools: Pre-installed with qcobjects, qcobjects-sdk, and qcobjects-cli for seamless development.
|
|
8
|
+
How to Run:
|
|
9
|
+
- Pull the Image:
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
docker pull qcobjects/qcobjects
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
- Run a Container:
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
docker run -it qcobjects/qcobjects
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
This setup ensures a consistent and efficient development experience, making it easier to build and deploy enterprise applications with QCObjects.
|
|
23
|
+
|
|
24
|
+
## Instructions to Create Your Own Docker Image `qcobjects_newapp`
|
|
25
|
+
|
|
26
|
+
Based on the provided Dockerfile, here are the steps to create your own Docker image `qcobjects_newapp` using the QCObjects Docker image (`qcobjects/qcobjects`):
|
|
27
|
+
|
|
28
|
+
1. **Create a Dockerfile:**
|
|
29
|
+
Create a new file named `Dockerfile` in your project directory with the following content:
|
|
30
|
+
|
|
31
|
+
```dockerfile
|
|
32
|
+
FROM qcobjects/qcobjects:latest
|
|
33
|
+
|
|
34
|
+
USER root
|
|
35
|
+
|
|
36
|
+
ENV XDG_RUNTIME_DIR $(id -u)
|
|
37
|
+
ENV container docker
|
|
38
|
+
ENV LC_ALL C
|
|
39
|
+
ENV DEBIAN_FRONTEND noninteractive
|
|
40
|
+
|
|
41
|
+
LABEL MAINTAINER "Jean Machuca <jean@qcobjects.com>"
|
|
42
|
+
LABEL Author "Jean Machuca <jean@qcobjects.com>"
|
|
43
|
+
LABEL org.opencontainers.image.authors="Jean Machuca <jean@qcobjects.com>"
|
|
44
|
+
ENV container docker
|
|
45
|
+
|
|
46
|
+
RUN npm i -g qcobjects qcobjects-sdk qcobjects-cli
|
|
47
|
+
|
|
48
|
+
# Configure the internal user permissions
|
|
49
|
+
RUN mkdir -p /home/qcobjects/app && chown -R qcobjects:qcobjects /home/qcobjects/app
|
|
50
|
+
|
|
51
|
+
# Setting the work directory
|
|
52
|
+
WORKDIR /home/qcobjects/app
|
|
53
|
+
ENV DOCUMENT_ROOT /home/qcobjects/app/
|
|
54
|
+
ENV DATA_PATH $DOCUMENT_ROOT/data/
|
|
55
|
+
COPY package*.json ./
|
|
56
|
+
|
|
57
|
+
# Run the initial install init scripts for jasmine and cache verify
|
|
58
|
+
# RUN jasmine init
|
|
59
|
+
RUN npm cache verify
|
|
60
|
+
RUN npm i
|
|
61
|
+
|
|
62
|
+
# Bundle app source
|
|
63
|
+
COPY --chown=qcobjects:qcobjects . .
|
|
64
|
+
|
|
65
|
+
USER qcobjects
|
|
66
|
+
|
|
67
|
+
EXPOSE 8080:8080
|
|
68
|
+
EXPOSE 8443:8443
|
|
69
|
+
|
|
70
|
+
CMD [ "npm", "start" ]
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
2. **Build the Docker Image:**
|
|
74
|
+
Open a terminal in your project directory and run the following command to build your Docker image:
|
|
75
|
+
|
|
76
|
+
```sh
|
|
77
|
+
docker build -t qcobjects_newapp .
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
3. **Run the Docker Container:**
|
|
81
|
+
Once the image is built, you can run a container using the following command:
|
|
82
|
+
|
|
83
|
+
```sh
|
|
84
|
+
docker run -it -p 8080:8080 -p 8443:8443 qcobjects_newapp
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
This will start your application using the QCObjects framework within a Docker container, making it easy to develop and deploy your enterprise applications.
|
|
88
|
+
|
|
89
|
+
## Instructions to Use Docker Compose with QCObjects Docker Image
|
|
90
|
+
|
|
91
|
+
Based on the provided `docker-compose` file, here are the steps to use Docker Compose to create and build your own Docker image `qcobjects_newapp`:
|
|
92
|
+
|
|
93
|
+
1. **Create a Dockerfile:**
|
|
94
|
+
Ensure you have a `Dockerfile` in your project directory with the following content:
|
|
95
|
+
|
|
96
|
+
```dockerfile
|
|
97
|
+
FROM qcobjects/qcobjects:latest
|
|
98
|
+
|
|
99
|
+
USER root
|
|
100
|
+
|
|
101
|
+
ENV XDG_RUNTIME_DIR $(id -u)
|
|
102
|
+
ENV container docker
|
|
103
|
+
ENV LC_ALL C
|
|
104
|
+
ENV DEBIAN_FRONTEND noninteractive
|
|
105
|
+
|
|
106
|
+
LABEL MAINTAINER "Jean Machuca <jean@qcobjects.com>"
|
|
107
|
+
LABEL Author "Jean Machuca <jean@qcobjects.com>"
|
|
108
|
+
LABEL org.opencontainers.image.authors="Jean Machuca <jean@qcobjects.com>"
|
|
109
|
+
ENV container docker
|
|
110
|
+
|
|
111
|
+
RUN npm i -g qcobjects qcobjects-sdk qcobjects-cli
|
|
112
|
+
|
|
113
|
+
# Configure the internal user permissions
|
|
114
|
+
RUN mkdir -p /home/qcobjects/app && chown -R qcobjects:qcobjects /home/qcobjects/app
|
|
115
|
+
|
|
116
|
+
# Setting the work directory
|
|
117
|
+
WORKDIR /home/qcobjects/app
|
|
118
|
+
ENV DOCUMENT_ROOT /home/qcobjects/app/
|
|
119
|
+
ENV DATA_PATH $DOCUMENT_ROOT/data/
|
|
120
|
+
COPY package*.json ./
|
|
121
|
+
|
|
122
|
+
# Run the initial install init scripts for jasmine and cache verify
|
|
123
|
+
# RUN jasmine init
|
|
124
|
+
RUN npm cache verify
|
|
125
|
+
RUN npm i
|
|
126
|
+
|
|
127
|
+
# Bundle app source
|
|
128
|
+
COPY --chown=qcobjects:qcobjects . .
|
|
129
|
+
|
|
130
|
+
USER qcobjects
|
|
131
|
+
|
|
132
|
+
EXPOSE 8080:8080
|
|
133
|
+
EXPOSE 8443:8443
|
|
134
|
+
|
|
135
|
+
CMD [ "npm", "start" ]
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
2. **Create a `docker-compose.yml` File:**
|
|
139
|
+
Create a `docker-compose.yml` file in your project directory with the following content:
|
|
140
|
+
|
|
141
|
+
```yaml
|
|
142
|
+
version: '3'
|
|
143
|
+
services:
|
|
144
|
+
qcobjects:
|
|
145
|
+
image: qcobjects_newapp:latest
|
|
146
|
+
hostname: qcobjects_newapp
|
|
147
|
+
command: ["npm", "run", "start"]
|
|
148
|
+
privileged: true
|
|
149
|
+
build:
|
|
150
|
+
context: ./
|
|
151
|
+
dockerfile: Dockerfile
|
|
152
|
+
volumes:
|
|
153
|
+
- ./letsencrypt:/etc/letsencrypt/live/newapp.qcobjects.dev
|
|
154
|
+
- ./data:/home/qcobjects/app/data
|
|
155
|
+
expose:
|
|
156
|
+
- 8080:8080
|
|
157
|
+
- 8443:8443
|
|
158
|
+
- 10300:10300
|
|
159
|
+
ports:
|
|
160
|
+
- 8080:8080
|
|
161
|
+
- 8443:8443
|
|
162
|
+
- 10300:10300
|
|
163
|
+
env_file:
|
|
164
|
+
- ./.env
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
3. **Environment Variables:**
|
|
168
|
+
Create a `.env` file in your project directory to define environment variables. This file might include variables such as:
|
|
169
|
+
|
|
170
|
+
```env
|
|
171
|
+
NODE_ENV=production
|
|
172
|
+
PORT=8080
|
|
173
|
+
SSL_PORT=8443
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
4. **Build and Run the Docker Compose Setup:**
|
|
177
|
+
Open a terminal in your project directory and run the following commands:
|
|
178
|
+
|
|
179
|
+
```sh
|
|
180
|
+
# Build the Docker image
|
|
181
|
+
docker-compose build
|
|
182
|
+
|
|
183
|
+
# Start the services
|
|
184
|
+
docker-compose up
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
## Explanation of Environment Variables and Settings:
|
|
188
|
+
|
|
189
|
+
- **`NODE_ENV`**: Specifies the environment in which the application is running (e.g., `development`, `production`).
|
|
190
|
+
- **`PORT`**: The port on which the application will run (default is `8080`).
|
|
191
|
+
- **`SSL_PORT`**: The port for SSL connections (default is `8443`).
|
|
192
|
+
|
|
193
|
+
## Volumes:
|
|
194
|
+
- **`./letsencrypt:/etc/letsencrypt/live/newapp.qcobjects.dev`**: Maps the local `letsencrypt` directory to the container's directory for SSL certificates.
|
|
195
|
+
- **`./data:/home/qcobjects/app/data`**: Maps the local `data` directory to the container's data directory.
|
|
196
|
+
|
|
197
|
+
## Ports:
|
|
198
|
+
- **`8080:8080`**: Maps port `8080` on the host to port `8080` in the container.
|
|
199
|
+
- **`8443:8443`**: Maps port `8443` on the host to port `8443` in the container.
|
|
200
|
+
- **`10300:10300`**: Maps port `10300` on the host to port `10300` in the container.
|
|
201
|
+
|
|
202
|
+
These steps will help you set up and run your QCObjects application using Docker Compose, ensuring a consistent and efficient development environment.
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.4.
|
|
1
|
+
2.4.99
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "qcobjects",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.99",
|
|
4
4
|
"description": "QCObjects is an Open-source framework that empowers full-stack developers to make micro-services and micro-frontends into an N-Tier architecture.",
|
|
5
5
|
"main": "src/index.cjs",
|
|
6
6
|
"module": "src/index.mjs",
|