summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeonXP <i@neonxp.ru>2024-01-27 05:28:56 +0300
committerNeonXP <i@neonxp.ru>2024-01-27 05:28:56 +0300
commit51f7100a3ffcdf2b674df3600b380ed586c01eb1 (patch)
tree5c1842bd8b4abaf20bb41c6e5884462060f49e1f
parent6801a91f585b9bdac1b7f85865fdb93de73d275f (diff)
Примеры конфигов
-rw-r--r--devcontainer.json24
-rw-r--r--docker-compose.yml24
2 files changed, 48 insertions, 0 deletions
diff --git a/devcontainer.json b/devcontainer.json
new file mode 100644
index 0000000..f713571
--- /dev/null
+++ b/devcontainer.json
@@ -0,0 +1,24 @@
+{
+ "name": "Go environment",
+ "dockerComposeFile": "docker-compose.yml",
+ "service": "app",
+ "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
+ "forwardPorts": [5432, 8000],
+ "remoteUser": "vscode",
+ "customizations": {
+ "vscode": {
+ "extensions": [
+ "golang.go",
+ "neonxp.gotools",
+ "r3inbowari.gomodexplorer",
+ "ms-vscode.makefile-tools",
+ "redhat.vscode-yaml",
+ "humao.rest-client",
+ "mtxr.sqltools",
+ "mtxr.sqltools-driver-pg",
+ "codezombiech.gitignore",
+ "ms-azuretools.vscode-docker"
+ ]
+ }
+ }
+}
diff --git a/docker-compose.yml b/docker-compose.yml
new file mode 100644
index 0000000..4a959ae
--- /dev/null
+++ b/docker-compose.yml
@@ -0,0 +1,24 @@
+version: '3.8'
+
+volumes:
+ postgres-data:
+
+services:
+ app:
+ build:
+ context: .
+ dockerfile: Dockerfile
+ env_file:
+ - .env
+ volumes:
+ - ../..:/workspaces:cached
+ command: sleep infinity
+ network_mode: service:db
+
+ db:
+ image: postgres:15-alpine3.17
+ restart: unless-stopped
+ volumes:
+ - postgres-data:/var/lib/postgresql/data
+ env_file:
+ - .env