version: "3.7" ########################### NETWORKS # There is no need to create any networks outside this docker-compose file. # You may customize the network subnets (192.168.90.0/24 and 91.0/24) below as you please. # Docker Compose version 3.5 or higher required to define networks this way. networks: gl_proxy: name: gl_proxy driver: bridge ipam: config: - subnet: $GL_PROXY_SUBNET - gateway: $GL_PROXY_GATEWAY default: driver: bridge gl_socket_proxy: name: gl_socket_proxy driver: bridge ipam: config: - subnet: $GL_SOCKET_PROXY_SUBNET - gateway: $GL_SOCKET_PROXY_GATEWAY ########################### SERVICES services: # VSCode - VSCode Editing # sudo chown -R 1000:1000 /home/coder/project vscode: image: codercom/code-server:latest container_name: gl-vscode restart: always networks: gl_proxy: ipv4_address: $VSCODE_IP # ports: # - "$VSCODE_PORT:8080" volumes: - $USERDIR/server:/home/coder/server - $DOCKERDIR:/home/coder/docker - $DOCKERDIR/appdata/vscode:/home/coder #- /media/hdd1:/home/coder/hdd1 environment: PASSWORD: $VSCODE_PASSWORD # Run as root first, create the directories, then change permissions to user:docker and 775. Disable run as root below. #user: $PUID:$PGID user: "0" DOCKER_HOST: $DOCKER_ENDPOINT labels: - "traefik.enable=true" ## HTTP Routers - "traefik.http.routers.vscode-rtr.entrypoints=https" - "traefik.http.routers.vscode-rtr.rule=Host(`code.$DOMAINNAME0`)" ## Middlewares - "traefik.http.routers.vscode-rtr.middlewares=chain-authelia@file" ## HTTP Services - "traefik.http.routers.vscode-rtr.service=vscode-svc" - "traefik.http.services.vscode-svc.loadbalancer.server.port=8080"