diff options
Diffstat (limited to 'template')
| -rw-r--r-- | template/Caddyfile.template | 2 | ||||
| -rw-r--r-- | template/docker-compose.yaml.template | 8 | ||||
| -rwxr-xr-x | template/generate.py | 5 | 
3 files changed, 9 insertions, 6 deletions
diff --git a/template/Caddyfile.template b/template/Caddyfile.template index df917ac..b2d3dd7 100644 --- a/template/Caddyfile.template +++ b/template/Caddyfile.template @@ -16,5 +16,5 @@ timeline.{{CRUPEST_DOMAIN}} {  }  code.{{CRUPEST_DOMAIN}} { -	reverse_proxy code_server:8080 +	reverse_proxy code-server:8080  } diff --git a/template/docker-compose.yaml.template b/template/docker-compose.yaml.template index 5cc6d10..699bc6f 100644 --- a/template/docker-compose.yaml.template +++ b/template/docker-compose.yaml.template @@ -32,15 +32,17 @@ services:        - internal    code-server: +    image: crupest/arch-code-server:latest      build: -      context: ./docker/code-server +      context: ./docker/arch-code-server        dockerfile: Dockerfile        args:          - CRUPEST_USER={{CRUPEST_USER}}          - CRUPEST_GROUP={{CRUPEST_GROUP}}          - CRUPEST_UID={{CRUPEST_UID}}          - CRUPEST_GID={{CRUPEST_GID}} -    container_name: code_server +        - USE_CHINA_MIRROR={{CRUPEST_IN_CHINA}} +    container_name: code-server      restart: on-failure:3      volumes:        - ./data/code-server:/data @@ -52,7 +54,7 @@ services:    caddy:      image: caddy:latest      container_name: caddy -    restart: always +    restart: on-failure:3      volumes:        - ./Caddyfile:/etc/caddy/Caddyfile        - ./site:/srv:ro diff --git a/template/generate.py b/template/generate.py index 1c94cda..a929b07 100755 --- a/template/generate.py +++ b/template/generate.py @@ -8,7 +8,7 @@ import grp  import sys  required_config_keys = set(["CRUPEST_DOMAIN", "CRUPEST_USER", "CRUPEST_GROUP", "CRUPEST_UID", -                            "CRUPEST_GID", "CRUPEST_HALO_DB_PASSWORD"]) +                            "CRUPEST_GID", "CRUPEST_HALO_DB_PASSWORD", "CRUPEST_IN_CHINA"])  print("It's happy to see you!\n") @@ -98,6 +98,7 @@ if not os.path.exists(config_path):      config["CRUPEST_UID"] = str(os.getuid())      config["CRUPEST_GID"] = str(os.getgid())      config["CRUPEST_HALO_DB_PASSWORD"] = os.urandom(8).hex() +    config["CRUPEST_IN_CHINA"] = "false"      config_content = ""      for key in config:          config_content += f"{key}={config[key]}\n" @@ -160,4 +161,4 @@ for filename in filenames:          with open(os.path.join(project_dir, filename), "w") as f:              f.write(content) -print("\n🍻All done! See you next time!") +print("\n🍻All done! See you next time!\nBy the way, you may wish to run tool/download.py to download some scripts to do some extra setup like creating email user.")  | 
