Browse Source

update build configuration for goreleaser and docker

pull/28/head v1.0.0
Dimas Restu H 4 years ago
parent
commit
51edf6c468
  1. 10
      .env.default
  2. 4
      .goreleaser.yml
  3. 2
      Dockerfile

10
.env.default

@ -1,13 +1,13 @@
# ----------------------------------- # -----------------------------------
# Server Configuration # Server Configuration
# ----------------------------------- # -----------------------------------
# SERVER_ADDRESS=127.0.0.1
# SERVER_PORT=3000
SERVER_ADDRESS=0.0.0.0
SERVER_PORT=3000
# ----------------------------------- # -----------------------------------
# HTTP Configuration # HTTP Configuration
# ----------------------------------- # -----------------------------------
# HTTP_BASE_URL=/api/v1/whatsapp
HTTP_BASE_URL=/api/v1/whatsapp
# HTTP_CORS_ORIGIN=* # HTTP_CORS_ORIGIN=*
# HTTP_BODY_LIMIT_SIZE=8m # HTTP_BODY_LIMIT_SIZE=8m
@ -25,8 +25,8 @@
# ----------------------------------- # -----------------------------------
# WhatsApp Configuration # WhatsApp Configuration
# ----------------------------------- # -----------------------------------
# WHATSAPP_DATASTORE_TYPE=sqlite
# WHATSAPP_DATASTORE_URI=file:dbs/WhatsApp.db?_foreign_keys=on
WHATSAPP_DATASTORE_TYPE=sqlite
WHATSAPP_DATASTORE_URI=file:dbs/WhatsApp.db?_foreign_keys=on
# WHATSAPP_VERSION_MAJOR=2 # WHATSAPP_VERSION_MAJOR=2
# WHATSAPP_VERSION_MINOR=2214 # WHATSAPP_VERSION_MINOR=2214

4
.goreleaser.yml

@ -23,8 +23,8 @@ archives:
amd64: 64-bit amd64: 64-bit
format: zip format: zip
files: files:
- README.md
- dbs/*
- .env.default
- dbs/.gitkeep
checksum: checksum:
name_template: 'checksums.txt' name_template: 'checksums.txt'
snapshot: snapshot:

2
Dockerfile

@ -23,7 +23,7 @@ WORKDIR /usr/app/${SERVICE_NAME}
RUN mkdir -p dbs \ RUN mkdir -p dbs \
&& chmod 755 dbs && chmod 755 dbs
COPY --from=go-builder /usr/src/app/.env.production ./.env
COPY --from=go-builder /usr/src/app/.env.default ./.env
COPY --from=go-builder /usr/src/app/main ./main COPY --from=go-builder /usr/src/app/main ./main
EXPOSE 3000 EXPOSE 3000

Loading…
Cancel
Save