mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-06 03:20:13 +08:00
feat: connect containers to custom network
- Export the `get` function in `utils/env.js` - Change the Docker image in `docker.js` from `ubuntu` to `lancatlin/quest-helloworld` - Remove the `createContainer` and `getContainer` functions from `docker.js` - Add a `network` constant in `docker.js` that gets the Docker network from the config - Connect the container to the network in `getOrCreateContainer` function in `docker.js` - Add `API_ENDPOINT` environment variable in the `attachContainer` function in `docker.js` Signed-off-by: wancat <wancat@wancat.cc>
This commit is contained in:
1 parent
189c87df5a
commit
943c11714c
3 files changed
+15
-22
No files matched your search
@@ -0,0 +1,7 @@
|
||||
export function get(key, defaultValue) {
|
||||
const value = process.env[key]
|
||||
if (value != null) {
|
||||
return value
|
||||
}
|
||||
return defaultValue
|
||||
}
|
||||
Reference in new issue
Block a user