feat: better docker and debug .vscode
This commit is contained in:
20
.vscode/launch.json
vendored
Normal file
20
.vscode/launch.json
vendored
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
// Use IntelliSense to learn about possible attributes.
|
||||||
|
// Hover to view descriptions of existing attributes.
|
||||||
|
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "Launch Relayer",
|
||||||
|
"type": "go",
|
||||||
|
"request": "launch",
|
||||||
|
"mode": "debug",
|
||||||
|
"asRoot": true,
|
||||||
|
"program": "${workspaceFolder}/examples/basic",
|
||||||
|
"cwd": "${workspaceFolder}/examples/basic",
|
||||||
|
"env": {
|
||||||
|
"POSTGRESQL_DATABASE" : "postgres://nostr:nostr@localhost:5432/nostr?sslmode=disable"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
FROM golang:1.18
|
FROM golang:1.21.1
|
||||||
|
|
||||||
WORKDIR /go/src/app
|
WORKDIR /go/src/app
|
||||||
COPY ./ .
|
COPY ./ .
|
||||||
|
|
||||||
RUN go get -d -v ./...
|
RUN go get -d -v ./...
|
||||||
RUN go install -v ./...
|
RUN go install -v ./...
|
||||||
RUN cd basic && make
|
RUN cd examples/basic && make
|
||||||
|
|||||||
@@ -3,17 +3,17 @@ services:
|
|||||||
|
|
||||||
relay:
|
relay:
|
||||||
build:
|
build:
|
||||||
context: ../
|
context: ../../
|
||||||
dockerfile: ./basic/Dockerfile
|
dockerfile: ./examples/basic/Dockerfile
|
||||||
environment:
|
environment:
|
||||||
PORT: 2700
|
PORT: 7447
|
||||||
POSTGRESQL_DATABASE: postgres://nostr:nostr@postgres:5432/nostr?sslmode=disable
|
POSTGRESQL_DATABASE: postgres://nostr:nostr@postgres:5432/nostr?sslmode=disable
|
||||||
depends_on:
|
depends_on:
|
||||||
postgres:
|
postgres:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
ports:
|
ports:
|
||||||
- 2700:2700
|
- 2700:7447
|
||||||
command: "./basic/relayer-basic"
|
command: "./examples/basic/relayer-basic"
|
||||||
|
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres
|
image: postgres
|
||||||
@@ -30,3 +30,19 @@ services:
|
|||||||
interval: 10s
|
interval: 10s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 5
|
retries: 5
|
||||||
|
|
||||||
|
pgadmin:
|
||||||
|
container_name: pgadmin
|
||||||
|
image: dpage/pgadmin4
|
||||||
|
restart: unless-stopped
|
||||||
|
depends_on:
|
||||||
|
- postgres
|
||||||
|
ports:
|
||||||
|
- "5050:80"
|
||||||
|
environment:
|
||||||
|
PGADMIN_DEFAULT_EMAIL: nostr@nostr.nostr
|
||||||
|
PGADMIN_DEFAULT_PASSWORD: nostr
|
||||||
|
volumes:
|
||||||
|
- pgadmin:/var/lib/pgadmin
|
||||||
|
volumes:
|
||||||
|
pgadmin:
|
||||||
Reference in New Issue
Block a user