first commit
This commit is contained in:
commit
7bcd640ef3
|
@ -0,0 +1,4 @@
|
|||
.email
|
||||
.db-password
|
||||
.db-root-password
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
FROM ghost:alpine
|
||||
RUN apk update && apk add gettext
|
||||
COPY config.production.template /var/lib/ghost/
|
||||
COPY run.sh .
|
||||
CMD ["sh", "./run.sh"]
|
|
@ -0,0 +1,56 @@
|
|||
# Village hall website
|
||||
|
||||
This is the configuration for the **docker stack** running village hall web site.
|
||||
|
||||
Served by a reverse proxy running on another docker stack.
|
||||
|
||||
## secrets
|
||||
|
||||
you need to put secrets in the following files
|
||||
|
||||
### .email
|
||||
|
||||
```
|
||||
{
|
||||
"transport": "SMTP",
|
||||
"options":
|
||||
{
|
||||
"service": "Mailgun",
|
||||
"host": "smtp.eu.mailgun.org",
|
||||
"secure": true,
|
||||
"port": 465,
|
||||
"auth": {
|
||||
"user": "[secret!!]",
|
||||
"pass": "[secret!]"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### .db-password
|
||||
|
||||
```
|
||||
[secret!]
|
||||
```
|
||||
|
||||
### .db-root-password
|
||||
|
||||
```
|
||||
[secret!]
|
||||
```
|
||||
|
||||
## build
|
||||
|
||||
```sh
|
||||
|
||||
sh build.sh
|
||||
|
||||
```
|
||||
|
||||
## deploy
|
||||
|
||||
```sh
|
||||
|
||||
sh deploy.sh
|
||||
```
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"url": "http://localhost:2368",
|
||||
"server": {
|
||||
"port": 2368,
|
||||
"host": "::"
|
||||
},
|
||||
"mail": {
|
||||
"transport": "Direct"
|
||||
},
|
||||
"logging": {
|
||||
"transports": [
|
||||
"file",
|
||||
"stdout"
|
||||
]
|
||||
},
|
||||
"process": "systemd",
|
||||
"paths": {
|
||||
"contentPath": "/var/lib/ghost/content"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"url": "http://localhost:2368",
|
||||
"server": {
|
||||
"port": 2368,
|
||||
"host": "::"
|
||||
},
|
||||
"mail": $EMAIL,
|
||||
"logging": {
|
||||
"transports": [
|
||||
"file",
|
||||
"stdout"
|
||||
]
|
||||
},
|
||||
"process": "systemd",
|
||||
"paths": {
|
||||
"contentPath": "/var/lib/ghost/content"
|
||||
},
|
||||
"database": {
|
||||
"client": "mysql",
|
||||
"connection": {
|
||||
"host": "db",
|
||||
"user": "ghost",
|
||||
"password": "$DBPASSWORD",
|
||||
"database": "ghostdb"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
docker stack rm rose-ash
|
||||
|
||||
for i in 1 2 3 4 5 6 7 8 9 10; do sleep 5 && docker stack deploy -c docker-compose.yml rose-ash && break ; done
|
|
@ -0,0 +1,51 @@
|
|||
version: "3.3"
|
||||
services:
|
||||
ghost:
|
||||
image: rose-ash-ghost:latest
|
||||
depends_on:
|
||||
- db
|
||||
environment:
|
||||
url: https://sigyl.com:4000/
|
||||
NODE_ENV: production
|
||||
volumes:
|
||||
- ghost-content:/var/lib/ghost/content
|
||||
networks:
|
||||
- appnet
|
||||
- externalnet
|
||||
secrets:
|
||||
- email
|
||||
- db-password
|
||||
|
||||
db:
|
||||
image: mariadb:latest
|
||||
environment:
|
||||
FILE__MYSQL_ROOT_PASSWORD: /run/secrets/db-root-password
|
||||
MYSQL_USER: ghost
|
||||
FILE__MYSQL_PASSWORD: /run/secrets/db-password
|
||||
MYSQL_DATABASE: ghostdb
|
||||
volumes:
|
||||
- ghost-db:/var/lib/mysql
|
||||
networks:
|
||||
- appnet
|
||||
secrets:
|
||||
- db-password
|
||||
- db-root-password
|
||||
|
||||
volumes:
|
||||
ghost-content:
|
||||
ghost-config:
|
||||
ghost-db:
|
||||
|
||||
networks:
|
||||
appnet:
|
||||
driver: overlay
|
||||
externalnet:
|
||||
driver: overlay
|
||||
external: true
|
||||
secrets:
|
||||
email:
|
||||
file: ./.email
|
||||
db-password:
|
||||
file: ./.db-password
|
||||
db-root-password:
|
||||
file: ./.db-root-password
|
Loading…
Reference in New Issue