M sdbapi/Dockerfile => sdbapi/Dockerfile +1 -1
@@ 9,7 9,7 @@ COPY ./middlewares /app/middlewares
COPY ./models /app/models
COPY ./apierror /app/apierror
COPY ./main.go /app/main.go
-COPY ./go.* /app
+COPY ./go.* /app/
RUN GOOS=linux go build -o /app/api main.go
A sdbapi/dev-launch-alpine.sh => sdbapi/dev-launch-alpine.sh +25 -0
@@ 0,0 1,25 @@
+#!/bin/bash
+
+export COMPOSE_PROJECT_NAME=sdbapi
+
+function confirm() {
+ echo -n "$@ [y/N]: "
+ read -e answer
+ for response in y Y
+ do
+ if [ "_$answer" == "_$response" ]
+ then
+ return 0
+ fi
+ done
+
+ # default to no
+ return 1
+}
+
+confirm reset containers? && docker-compose down
+confirm reset database? && docker volume rm sdbapi_apidb_data
+
+confirm rebuild api? && docker-compose build
+
+confirm launch? && docker-compose up
M sdbapi/dev-launch.sh => sdbapi/dev-launch.sh +2 -0
@@ 1,5 1,7 @@
#!/bin/bash
+export COMPOSE_PROJECT_NAME=sdbapi
+
function confirm() {
echo -n "$@ [y/N]: "
read -e answer
M sdbapi/docker-compose.yaml => sdbapi/docker-compose.yaml +0 -2
@@ 1,7 1,5 @@
version: "3.8"
-name: sdbapi
-
networks:
internal:
external: false