aboutsummaryrefslogtreecommitdiff
path: root/template
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-11-06 16:50:27 +0800
committercrupest <crupest@outlook.com>2022-11-06 16:50:27 +0800
commit1562a317e147954c5618ecdccbfd10c944bf81ce (patch)
tree4d8126b1578672edb3cd5180d29e45ec1e4bee90 /template
parenteacf141eb42029dad5cdf511f3b255ed90e84df2 (diff)
downloadcrupest-1562a317e147954c5618ecdccbfd10c944bf81ce.tar.gz
crupest-1562a317e147954c5618ecdccbfd10c944bf81ce.tar.bz2
crupest-1562a317e147954c5618ecdccbfd10c944bf81ce.zip
Beautiful color in terminal thanks to rich!
Diffstat (limited to 'template')
-rw-r--r--template/Caddyfile.template24
-rw-r--r--template/README.md2
-rw-r--r--template/docker-compose.yaml.template31
3 files changed, 12 insertions, 45 deletions
diff --git a/template/Caddyfile.template b/template/Caddyfile.template
deleted file mode 100644
index 0a0122b..0000000
--- a/template/Caddyfile.template
+++ /dev/null
@@ -1,24 +0,0 @@
-{
- email {{CRUPEST_EMAIL}}
-}
-
-{{CRUPEST_DOMAIN}} {
- root * /srv
- encode gzip
- file_server
-}
-
-blog.{{CRUPEST_DOMAIN}} {
- encode gzip
- reverse_proxy halo:8090
-}
-
-timeline.{{CRUPEST_DOMAIN}} {
- encode gzip
- reverse_proxy timeline:5000
-}
-
-code.{{CRUPEST_DOMAIN}} {
- encode gzip
- reverse_proxy code-server:8080
-}
diff --git a/template/README.md b/template/README.md
index a8aebd1..5228d6b 100644
--- a/template/README.md
+++ b/template/README.md
@@ -1,6 +1,6 @@
This directory contains the template files used to generate the final config files. They should not be used directly usually. Run `../tool/setup.py` to perform any generation and necessary setup.
-The template format is quite simple: they are just files containing `{{VAR}}`s. You can simply use text substitution to do the generation. All variable names begin with `CRUPEST_` to avoid name conflicts.
+The template format is quite simple: they are just files containing `$VAR`s or `${VAR}`s. All variable names begin with `CRUPEST_` to avoid name conflicts.
Here are the variables used in templates:
| Variable | Description |
diff --git a/template/docker-compose.yaml.template b/template/docker-compose.yaml.template
index 699bc6f..ef6115f 100644
--- a/template/docker-compose.yaml.template
+++ b/template/docker-compose.yaml.template
@@ -14,7 +14,7 @@ services:
- SPRING_DATASOURCE_DRIVER_CLASS_NAME=org.h2.Driver
- SPRING_DATASOURCE_URL=jdbc:h2:file:~/.halo/db/halo
- SPRING_DATASOURCE_USERNAME=admin
- - SPRING_DATASOURCE_PASSWORD={{CRUPEST_HALO_DB_PASSWORD}}
+ - SPRING_DATASOURCE_PASSWORD=$CRUPEST_HALO_DB_PASSWORD
- HALO_ADMIN_PATH=admin
- HALO_CACHE=memory
networks:
@@ -37,11 +37,11 @@ services:
context: ./docker/arch-code-server
dockerfile: Dockerfile
args:
- - CRUPEST_USER={{CRUPEST_USER}}
- - CRUPEST_GROUP={{CRUPEST_GROUP}}
- - CRUPEST_UID={{CRUPEST_UID}}
- - CRUPEST_GID={{CRUPEST_GID}}
- - USE_CHINA_MIRROR={{CRUPEST_IN_CHINA}}
+ - CRUPEST_USER=$CRUPEST_USER
+ - CRUPEST_GROUP=$CRUPEST_GROUP
+ - CRUPEST_UID=$CRUPEST_UID
+ - CRUPEST_GID=$CRUPEST_GID
+ - USE_CHINA_MIRROR=$CRUPEST_IN_CHINA
container_name: code-server
restart: on-failure:3
volumes:
@@ -51,22 +51,13 @@ services:
networks:
- internal
- caddy:
- image: caddy:latest
- container_name: caddy
- restart: on-failure:3
- volumes:
- - ./Caddyfile:/etc/caddy/Caddyfile
- - ./site:/srv:ro
- - ./data/caddy/data:/data
- - ./data/caddy/config:/config
+ nginx:
+ image: nginx:latest
+ container_name: nginx
ports:
- "80:80"
- "443:443"
- - "443:443/udp"
- networks:
- - internal
- - external
+ volumes:
mailserver:
image: docker.io/mailserver/docker-mailserver:latest
@@ -74,7 +65,7 @@ services:
# If the FQDN for your mail-server is only two labels (eg: example.com),
# you can assign this entirely to `hostname` and remove `domainname`.
hostname: mail
- domainname: {{CRUPEST_DOMAIN}}
+ domainname: $CRUPEST_DOMAIN
env_file: mailserver.env
# More information about the mail-server ports:
# https://docker-mailserver.github.io/docker-mailserver/edge/config/security/understanding-the-ports/