Chmod, please. Also, fix environment variables. Hopefully.
This commit is contained in:
parent
40c97d2ab5
commit
84c02f6b48
3 changed files with 5 additions and 6 deletions
|
@ -16,3 +16,4 @@ BACKUP_S3_ACCESS_ID=0000000000000000000000000
|
||||||
BACKUP_S3_SECRET_ID=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
BACKUP_S3_SECRET_ID=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
BACKUP_S3_ENDPOINT=https://s3.us-east-005.backblazeb2.com
|
BACKUP_S3_ENDPOINT=https://s3.us-east-005.backblazeb2.com
|
||||||
BACKUP_S3_REGION=us-east-005
|
BACKUP_S3_REGION=us-east-005
|
||||||
|
BACKUP_SOURCE_PATH=/backups/guestbooky_$(date +\%Y-\%m-\%d)
|
|
@ -66,7 +66,7 @@ services:
|
||||||
--username ${GUESTBOOKY_USER}
|
--username ${GUESTBOOKY_USER}
|
||||||
--password ${GUESTBOOKY_USER}
|
--password ${GUESTBOOKY_USER}
|
||||||
--authenticationDatabase ${GUESTBOOKY_DB_NAME}
|
--authenticationDatabase ${GUESTBOOKY_DB_NAME}
|
||||||
--out /backups/guestbooky_$(date +\%Y-\%m-\%d) && touch /backups/backup_done"
|
--out ${BACKUP_SOURCE_PATH} && touch /backups/backup_done"
|
||||||
volumes:
|
volumes:
|
||||||
- ./backups:/backups
|
- ./backups:/backups
|
||||||
depends_on:
|
depends_on:
|
||||||
|
@ -89,7 +89,7 @@ services:
|
||||||
BACKUP_S3_ENDPOINT: ${BACKUP_S3_ENDPOINT}
|
BACKUP_S3_ENDPOINT: ${BACKUP_S3_ENDPOINT}
|
||||||
BACKUP_S3_REGION: ${BACKUP_S3_REGION}
|
BACKUP_S3_REGION: ${BACKUP_S3_REGION}
|
||||||
BACKUP_SOURCE_PATH: ${BACKUP_SOURCE_PATH}
|
BACKUP_SOURCE_PATH: ${BACKUP_SOURCE_PATH}
|
||||||
BACKUP_DESTINATION_PATH: ${BACKUP_DESTINATION_PATH}.gzip
|
BACKUP_DESTINATION_PATH: ${BACKUP_SOURCE_PATH}.gzip
|
||||||
volumes:
|
volumes:
|
||||||
- ./backups:/backups
|
- ./backups:/backups
|
||||||
|
|
||||||
|
|
|
@ -9,13 +9,11 @@ RUN go mod download
|
||||||
|
|
||||||
RUN go build -o guestbooky-backup cmd/guestbooky-backup/guestbooky-backup.go
|
RUN go build -o guestbooky-backup cmd/guestbooky-backup/guestbooky-backup.go
|
||||||
|
|
||||||
# Start a new stage from scratch
|
|
||||||
FROM alpine:latest
|
FROM alpine:latest
|
||||||
|
|
||||||
WORKDIR /root/
|
WORKDIR /root/
|
||||||
|
|
||||||
# Copy the Pre-built binary file from the previous stage
|
|
||||||
COPY --from=builder /app/guestbooky-backup .
|
COPY --from=builder /app/guestbooky-backup .
|
||||||
|
RUN chmod +x guestbooky-backup
|
||||||
|
|
||||||
# Command to run the executable
|
|
||||||
CMD ["./guestbooky-backup"]
|
CMD ["./guestbooky-backup"]
|
Loading…
Reference in a new issue