Skip to content

Commit 85931cb

Browse files
committed
fix: hugo setup
1 parent cdc7980 commit 85931cb

File tree

5 files changed

+17
-18
lines changed

5 files changed

+17
-18
lines changed

CONFIGURATION.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,11 @@ The client GUI uses [Material-UI](https://material-ui-next.com/) component libra
6969

7070
## Remote environments
7171

72-
You create the other environments just like you did the dev environment. However, you don't need to write down the basic auth credentials anymore, since you can reuse the same credentials as in dev environment.
72+
You can create the other environments just like you did the dev environment. However, you don't need to write down the basic auth credentials anymore, since you can reuse the same credentials as in dev environment.
7373

74-
Examples for environment names: `f-orders`, `dev`, `test`, `stag`, `canary`, `prod`. You configure project environments with `taito_environments` setting in `taito-config.sh`.
74+
Project environments are configured in `taito-config.sh` with the `taito_environments` setting. Examples for environment names: `f-orders`, `dev`, `test`, `stag`, `canary`, `prod`.
7575

76-
See [6. Remote environments](https://github.com/TaitoUnited/taito-cli/blob/master/docs/tutorial/05-remote-environments.md) chapter of Taito CLI tutorial for more thorough instructions.
76+
See [remote environments](https://taitounited.github.io/taito-cli/tutorial/05-remote-environments) chapter of Taito CLI tutorial for more thorough instructions.
7777

7878
Operations on production and staging environments usually require admin rights. Please contact DevOps personnel if necessary.
7979

@@ -100,7 +100,7 @@ Operations on production and staging environments usually require admin rights.
100100

101101
**Static site generator (www):** See [www/README.md](www/README.md) for configuration instructions. You can use static site generator e.g. for user guides or API documentation.
102102

103-
**Custom provider:** If you cannot use Docker containers on your remote environments, you can customize the deployment with a custom provider. Instead of deploying the application as docker container images, you can, for example, deploy the application as WAR or EAR packages on a Java application server, or install everything directly on the remote host. You can enable the custom provider with the `taito_provider` setting in `taito-config.sh` and implement [custom deployment scripts](https://github.com/TaitoUnited/SERVER-TEMPLATE/blob/master/scripts/custom-provider) yourself.
103+
**Custom provider:** If you cannot use Docker containers on your remote environments, you can customize the deployment with a custom provider. Instead of deploying the application as docker container images, you can, for example, deploy the application as WAR or EAR packages on a Java application server, or install everything directly on the remote host. You can enable the custom provider by setting `taito_provider=custom` in `taito-config.sh` and by implementing [custom deployment scripts](https://github.com/TaitoUnited/SERVER-TEMPLATE/blob/master/scripts/custom-provider) yourself.
104104

105105
## Kubernetes
106106

@@ -114,7 +114,7 @@ You can deploy configuration changes without rebuilding with the `taito deployme
114114

115115
You can add a new secret like this:
116116

117-
1. Add a secret definition to the `taito_secrets` setting in `taito-config.sh`.
117+
1. Add a secret definition to the `taito_secrets` or the `taito_remote_secrets` setting in `taito-config.sh`.
118118
2. Map the secret definition to a secret in `docker-compose.yaml` for Docker Compose and in `scripts/helm.yaml` for Kubernetes.
119119
3. Run `taito env rotate:ENV SECRET` to generate a secret value for an environment. Run the command for each environment separately. Note that the rotate command restarts all pods in the same namespace.
120120

docker-compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ services:
159159
volumes:
160160
- "./www:${DC_PATH}/service:delegated"
161161
- "${DC_PATH}/service/node_modules"
162-
- "${DC_PATH}/service/site/node_modules"
162+
- "${DC_PATH}/service/site/node_modules" # FOR GATSBY ONLY
163163
# FOR GATSBY ONLY:
164164
# - "/service/site/node_modules"
165165
environment:

scripts/taito-template/init.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ sed -i "s/ function / /" taito-config.sh
1212

1313
# Remote the example site
1414
rm -rf www/site
15-
sed -i '/ - "\/service\/site\/node_modules"/d' docker-compose.yaml
16-
sed -i '/ - "\/service\/site\/node_modules"/d' docker-compose-remote.yaml
15+
sed -i '/\/site\/node_modules" # FOR GATSBY ONLY/d' docker-compose.yaml
16+
sed -i '/\/site\/node_modules" # FOR GATSBY ONLY/d' docker-compose-remote.yaml
1717

1818
echo
1919
echo "######################"

www/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ Remove static site generators that you do not use from `www/install.sh`.
88

99
Start containers, and start a shell inside the www Docker container:
1010

11-
taito env apply
1211
taito start
1312
taito shell:www
1413

www/develop.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@
33

44
set -x
55

6-
if [ ! -d ./site ]; then
7-
# No site yet. Just keep container running.
8-
tail -f /dev/null
9-
elif [ -f ./site/package.json ]; then
6+
if [ -f ./site/package.json ]; then
107
# Gatsby development
118
cd /service/site && \
129
npm install && \
@@ -16,12 +13,15 @@ elif [ -f ./site/Gemfile ]; then
1613
cd /service/site && \
1714
bundle update && \
1815
bundle exec jekyll serve --host 0.0.0.0 --port 8080 \
19-
--baseurl "http://localhost:$COMMON_PUBLIC_PORT" \
20-
--livereload --livereload-port "$COMMON_PUBLIC_PORT"
21-
else
16+
--baseurl "http://localhost:${COMMON_PUBLIC_PORT}" \
17+
--livereload --livereload-port "${COMMON_PUBLIC_PORT}"
18+
elif [ -f ./site/config.toml ]; then
2219
# Hugo development
2320
cd /service/site && \
2421
hugo server -D --bind=0.0.0.0 --port 8080 \
25-
--baseURL "http://localhost:$COMMON_PUBLIC_PORT" --appendPort=false \
26-
--liveReloadPort "$COMMON_PUBLIC_PORT"
22+
--baseURL "http://localhost:${COMMON_PUBLIC_PORT}" --appendPort=false \
23+
--liveReloadPort "${COMMON_PUBLIC_PORT}"
24+
else
25+
echo "develop.sh: No site yet at www/site. Just keep the container running."
26+
tail -f /dev/null
2727
fi

0 commit comments

Comments
 (0)