File tree Expand file tree Collapse file tree 4 files changed +60
-3
lines changed
Expand file tree Collapse file tree 4 files changed +60
-3
lines changed Original file line number Diff line number Diff line change 1+ node_modules /
Original file line number Diff line number Diff line change 1+ FROM golang:1.19-alpine
2+
3+ WORKDIR /app/github.com/cryptag/leapchat/miniware
4+
5+ WORKDIR /app/github.com/cryptag/leapchat
6+
7+ RUN mkdir -p /build
8+
9+ COPY miniware/* miniware/
10+ COPY *.go .
11+ COPY go.* .
12+ COPY LICENSE.md .
13+
14+ RUN go build -o /leapchat
15+
16+ EXPOSE 8080
17+
18+ CMD ["/leapchat"]
Original file line number Diff line number Diff line change 1+
2+ start :
3+ docker compose up -d
4+
5+ stop :
6+ docker compose down
7+
8+ restart :
9+ docker compose restart
10+
11+ build :
12+ docker compose build
13+
14+ buildup :
15+ docker compose up -d --build
16+
17+ cleanv :
18+ docker compose down -v
Original file line number Diff line number Diff line change 1- version : ' 3.1 '
1+ version : ' 3.4 '
22
33services :
4+ app :
5+ build :
6+ context : .
7+ dockerfile : ./Dockerfile.dev
8+ ports :
9+ - 8080:8080
10+ depends_on :
11+ - postgrest
12+ volumes :
13+ - ./build:/build
414 postgres :
515 image : postgres:latest
616 ports :
7- - 127.0.0.1: 5432:5432
17+ - 5432:5433
818 environment :
919 - POSTGRES_PASSWORD=superuser
1020 - POSTGRES_USER=superuser
1121 - POSTGRES_DB=leapchat
1222 volumes :
1323 - ./_docker-volumes/postgres:/var/lib/postgresql/data
24+ # - ./db:/docker-entrypoint-initdb.d/
25+ healthcheck :
26+ test : ["CMD-SHELL", "pg_isready"]
27+ interval : 5s
28+ timeout : 60s
29+ retries : 10
1430 postgrest :
31+ command : postgrest /app/postgrest.conf
1532 image : postgrest/postgrest:latest
1633 ports :
1734 - 3000:3000
@@ -23,5 +40,8 @@ services:
2340 PGDATABASE : leapchat
2441 PGSCHEMA : public
2542 DB_ANON_ROLE : postgres
43+ volumes :
44+ - ./db/:/app
2645 depends_on :
27- - postgres
46+ postgres :
47+ condition : service_healthy
You can’t perform that action at this time.
0 commit comments