mirror of
https://github.com/ghndrx/blog-manifest.git
synced 2026-02-10 06:54:59 +00:00
Update README.md
This commit is contained in:
23
README.md
23
README.md
@@ -7,7 +7,7 @@ Prerequisites
|
|||||||
- The kubectl command-line tool installed on your local machine
|
- The kubectl command-line tool installed on your local machine
|
||||||
|
|
||||||
Workloads/Services/Secrets/ConfigMaps
|
Workloads/Services/Secrets/ConfigMaps
|
||||||
|
```
|
||||||
kubectl apply -f namespace.yaml
|
kubectl apply -f namespace.yaml
|
||||||
|
|
||||||
kubectl apply -f volumes/ghost-blog-pv.yaml
|
kubectl apply -f volumes/ghost-blog-pv.yaml
|
||||||
@@ -31,10 +31,10 @@ kubectl apply -f ~/config-map_secrets/ghost-blog-config-map.yaml
|
|||||||
kubectl apply -f ~/config-map_secrets/ghost-blog-secrets.yaml
|
kubectl apply -f ~/config-map_secrets/ghost-blog-secrets.yaml
|
||||||
kubectl apply -f ~/config-map_secrets/mysql-config-map.yaml
|
kubectl apply -f ~/config-map_secrets/mysql-config-map.yaml
|
||||||
kubectl apply -f ~/config-map_secrets/mysql-secrets.yaml
|
kubectl apply -f ~/config-map_secrets/mysql-secrets.yaml
|
||||||
|
```
|
||||||
|
```
|
||||||
gcloud compute disks create --size=50GB --zone='us-central1-c ghost-blog-disk, mysql-disk, nginx-proxy-disk
|
gcloud compute disks create --size=50GB --zone='us-central1-c ghost-blog-disk, mysql-disk, nginx-proxy-disk
|
||||||
|
```
|
||||||
This will create the necessary resources in the cluster, including a deployment for the Ghost app, a service for connecting to the MySQL server, and an ingress service for routing traffic to the Ghost app via the nginx-proxy with https and http.
|
This will create the necessary resources in the cluster, including a deployment for the Ghost app, a service for connecting to the MySQL server, and an ingress service for routing traffic to the Ghost app via the nginx-proxy with https and http.
|
||||||
|
|
||||||
Volumes
|
Volumes
|
||||||
@@ -48,8 +48,7 @@ A config.production.json file which contains the configuration settings for your
|
|||||||
The Ghost source files, which can be obtained by downloading the latest version of Ghost from the official website or by cloning the Ghost GitHub repository.
|
The Ghost source files, which can be obtained by downloading the latest version of Ghost from the official website or by cloning the Ghost GitHub repository.
|
||||||
Here's an example of a basic Dockerfile that can be used to build a Ghost image:
|
Here's an example of a basic Dockerfile that can be used to build a Ghost image:
|
||||||
|
|
||||||
bash
|
```
|
||||||
Copy code
|
|
||||||
FROM node:12
|
FROM node:12
|
||||||
|
|
||||||
ENV NODE_ENV production
|
ENV NODE_ENV production
|
||||||
@@ -63,21 +62,23 @@ RUN npm install --production
|
|||||||
|
|
||||||
CMD ["npm", "start"]
|
CMD ["npm", "start"]
|
||||||
You can build image with command:
|
You can build image with command:
|
||||||
|
```
|
||||||
perl
|
```
|
||||||
Copy code
|
|
||||||
docker build -t my-ghost-blog .
|
docker build -t my-ghost-blog .
|
||||||
|
```
|
||||||
This command will create an image with the name 'my-ghost-blog' using the files in the current directory.
|
This command will create an image with the name 'my-ghost-blog' using the files in the current directory.
|
||||||
|
|
||||||
It is important to note that this is a basic example and you may need to make adjustments to the Dockerfile depending on your specific requirements.
|
It is important to note that this is a basic example and you may need to make adjustments to the Dockerfile depending on your specific requirements.
|
||||||
|
|
||||||
And you also can use ghost official image from docker hub:
|
And you also can use ghost official image from docker hub:
|
||||||
|
|
||||||
Copy code
|
```
|
||||||
docker pull ghost:3
|
docker pull ghost:3
|
||||||
|
```
|
||||||
and use your config file and custom theme with this command:
|
and use your config file and custom theme with this command:
|
||||||
|
|
||||||
javascript
|
javascript
|
||||||
Copy code
|
```
|
||||||
docker run -d --name my-ghost-blog -p 2368:2368 -v /path/to/config.production.json:/var/lib/ghost/config.production.json -v /path/to/content:/var/lib/ghost/content ghost:3
|
docker run -d --name my-ghost-blog -p 2368:2368 -v /path/to/config.production.json:/var/lib/ghost/config.production.json -v /path/to/content:/var/lib/ghost/content ghost:3
|
||||||
|
```
|
||||||
This will start a container with the name 'my-ghost-blog', map port 2368 on the host to port 2368 in the container, and mount your config.production.json file and a custom theme to the appropriate locations in the container.
|
This will start a container with the name 'my-ghost-blog', map port 2368 on the host to port 2368 in the container, and mount your config.production.json file and a custom theme to the appropriate locations in the container.
|
||||||
Reference in New Issue
Block a user