Last active
January 16, 2023 05:23
-
-
Save minetaro12/cf0ee2223d891fbc001ae6b3440cf8d0 to your computer and use it in GitHub Desktop.
code-serverを動かす(あらかじめcoderディレクトリを作成する)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3" | |
services: | |
code: | |
image: ghcr.io/minetaro12/code-server:amd64-latest | |
# image: ghcr.io/minetaro12/code-server:arm64-latest #arm64 | |
hostname: code-server | |
restart: unless-stopped | |
environment: | |
TZ: "Asia/Tokyo" | |
# PASSWORD: "password" | |
user: "1001:1001" #ホストユーザーのuid,gidを設定 | |
ports: | |
- 8080:8080 | |
volumes: | |
- coder:/home/coder | |
volumes: | |
coder: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 443 ssl http2; | |
server_name example.com; | |
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem; | |
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem; | |
location / { | |
proxy_set_header Host $host; | |
proxy_pass http://127.0.0.1:8080; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection upgrade; | |
proxy_set_header Accept-Encoding gzip; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment