Pulumi code for my server setup
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Manually provide aliases

still doesn't work tho

+28 -32
+28 -32
src/service.ts
··· 121 121 mounts: docker.types.input.ContainerMount[]; 122 122 volumes: docker.types.input.ContainerVolume[]; 123 123 ports: (`${number}:${number}` | number)[]; 124 + aliases: string[]; 124 125 extraContainerOptions: Partial<docker.ContainerArgs>; 125 126 }, 126 127 "image" ··· 198 199 ...(args.envs || []), 199 200 ]; 200 201 201 - const containerArgs = { 202 - image: this.image.imageId, 202 + this.container = new docker.Container( 203 203 name, 204 - command: args.command, 205 - restart: "always", 206 - labels: convertLabels(labels), 207 - envs, 208 - ports: convertPorts(args.ports), 209 - mounts: args.mounts, 210 - volumes: args.volumes, 211 - ...args.extraContainerOptions, 212 - }; 213 - 214 - if (args.webPort && host) { 215 - containerArgs.networksAdvanced = [ 216 - { 217 - name: network.name, 218 - // aliases: [host], 219 - }, 220 - ]; 221 - } else { 222 - containerArgs.networksAdvanced = [ 223 - { 224 - name: network.name, 225 - }, 226 - ]; 227 - } 228 - 229 - this.container = new docker.Container(name, containerArgs, { 230 - parent: this, 231 - deleteBeforeReplace: true, 232 - replaceOnChanges: ["mounts", "volumes"], 233 - }); 204 + { 205 + image: this.image.imageId, 206 + name, 207 + command: args.command, 208 + restart: "always", 209 + labels: convertLabels(labels), 210 + envs, 211 + ports: convertPorts(args.ports), 212 + mounts: args.mounts, 213 + volumes: args.volumes, 214 + networksAdvanced: [ 215 + { 216 + name: network.name, 217 + ...(args.aliases && { 218 + aliases: args.aliases, 219 + }), 220 + }, 221 + ], 222 + ...args.extraContainerOptions, 223 + }, 224 + { 225 + parent: this, 226 + deleteBeforeReplace: true, 227 + replaceOnChanges: ["mounts", "volumes"], 228 + }, 229 + ); 234 230 235 231 this.registerOutputs({ 236 232 container: this.container,