Skip to content

Commit

Permalink
feat: add network options and tini
Browse files Browse the repository at this point in the history
  • Loading branch information
lakkeger committed Aug 8, 2024
1 parent e04ef3a commit dbfb1c5
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/localstack-dood/.devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,15 @@ services:
- "127.0.0.1:4566:4566" # LocalStack Gateway
- "127.0.0.1:4510-4559:4510-4559" # external services port range
- "127.0.0.1:443:443" # LocalStack HTTPS Gateway (Pro)
- "127.0.0.1:53:53" # LocalStack DNS Server
env_file:
- .env
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
- "${templateOption:volumePath}:/var/lib/localstack"
networks:
ls:
# Set the container IP address in the 10.0.2.0/24 subnet
ipv4_address: 10.0.2.20
${templateOption:networkName}:
# Set the container IP address in the ${templateOption:networkCidr} subnet
ipv4_address: ${templateOption:ipAddress}

app:
build:
Expand All @@ -27,17 +26,18 @@ services:
- ../..:/workspaces:cached
# Overrides default command so things don't shut down after the process ends.
command: sleep infinity
init: true
env_file:
- .env
dns:
# Set the DNS server to be the LocalStack container
- 10.0.2.20
- ${templateOption:ipAddress}
networks:
- ls

networks:
ls:
${templateOption:networkName}:
ipam:
config:
# Specify the subnet range for IP address allocation
- subnet: 10.0.2.0/24
- subnet: ${templateOption:networkCidr}
15 changes: 15 additions & 0 deletions src/localstack-dood/devcontainer-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,21 @@
],
"default": "info"
},
"networkName": {
"type": "string",
"descripiton": "LocalStack network name:",
"default": "ls"
},
"networkCidr": {
"type": "string",
"descripiton": "LocalStack network CIDR:",
"default": "10.0.2.0/24"
},
"ipAddress": {
"type": "string",
"descripiton": "LocalStack IP:",
"default": "10.0.2.20"
},
"host": {
"type": "string",
"descripiton": "LocalStack hostname:",
Expand Down

0 comments on commit dbfb1c5

Please sign in to comment.