[GH-ISSUE #37] Purpose of build/pack.sh #30

Open
opened 2026-02-25 20:30:19 +03:00 by kerem · 1 comment
Owner

Originally created by @bnhf on GitHub (Feb 14, 2022).
Original GitHub issue: https://github.com/adamwalach/openvpn-web-ui/issues/37

Can anyone enlighten me on what the build/pack.sh script does? I'm including it below:

#!/bin/bash

set -e

time docker run \
    -v "$PWD/../":/go/src/github.com/bnhf/openvpn-tap-external-web-ui \
    --rm \
    -w /usr/src/myapp \
    tyzbit/beego:1.9.4 \
    sh -c "cd /go/src/github.com/bnhf/openvpn-tap-external-web-ui/ && bee version && bee pack -exr='^vendor|^data.db|^build|^README.md|^docs'"
cd github.com

Thanks!

Originally created by @bnhf on GitHub (Feb 14, 2022). Original GitHub issue: https://github.com/adamwalach/openvpn-web-ui/issues/37 Can anyone enlighten me on what the build/pack.sh script does? I'm including it below: ``` #!/bin/bash set -e time docker run \ -v "$PWD/../":/go/src/github.com/bnhf/openvpn-tap-external-web-ui \ --rm \ -w /usr/src/myapp \ tyzbit/beego:1.9.4 \ sh -c "cd /go/src/github.com/bnhf/openvpn-tap-external-web-ui/ && bee version && bee pack -exr='^vendor|^data.db|^build|^README.md|^docs'" cd github.com ``` Thanks!
Author
Owner

@bnhf commented on GitHub (Feb 15, 2022):

Can anyone enlighten me on what the build/pack.sh script does? I'm including it below:

#!/bin/bash

set -e

time docker run \
    -v "$PWD/../":/go/src/github.com/bnhf/openvpn-tap-external-web-ui \
    --rm \
    -w /usr/src/myapp \
    tyzbit/beego:1.9.4 \
    sh -c "cd /go/src/github.com/bnhf/openvpn-tap-external-web-ui/ && bee version && bee pack -exr='^vendor|^data.db|^build|^README.md|^docs'"
cd github.com

Thanks!

Answering my own question here, as I corresponded with @tyzbit who's version of this repository I forked. The pack.sh script is intended to create the tar.gz archive used in the Docker build. It makes sense that this is the purpose, as I had to figure out what was needed, in addition to the executable created by "bee run", by looking in @tyzbit's container.

The script is doing this using a Beego Docker container with the 1.9.4 version of Beego. This may not be necessary however, as the web-ui appears to be working fine with my manual build of the archive, and it appears to also work to run just this portion of the script:

bee pack -exr='^vendor|^data.db|^build|^README.md|^docs'

from the parent directory of the repository as it exists on your local machine, e.g. openvpn-web-ui. If you want to create the archive manually, I listed the files I believe are necessary in the README.md of my fork of this project.

<!-- gh-comment-id:1039757974 --> @bnhf commented on GitHub (Feb 15, 2022): > Can anyone enlighten me on what the build/pack.sh script does? I'm including it below: > > ``` >#!/bin/bash > > set -e > > time docker run \ > -v "$PWD/../":/go/src/github.com/bnhf/openvpn-tap-external-web-ui \ > --rm \ > -w /usr/src/myapp \ > tyzbit/beego:1.9.4 \ > sh -c "cd /go/src/github.com/bnhf/openvpn-tap-external-web-ui/ && bee version && bee pack -exr='^vendor|^data.db|^build|^README.md|^docs'" > cd github.com > ``` > > Thanks! Answering my own question here, as I corresponded with @tyzbit who's version of this repository I forked. The pack.sh script is intended to create the tar.gz archive used in the Docker build. It makes sense that this is the purpose, as I had to figure out what was needed, in addition to the executable created by "bee run", by looking in @tyzbit's container. The script is doing this using a Beego Docker container with the 1.9.4 version of Beego. This may not be necessary however, as the web-ui appears to be working fine with my manual build of the archive, and it appears to also work to run just this portion of the script: ``` bee pack -exr='^vendor|^data.db|^build|^README.md|^docs' ``` from the parent directory of the repository as it exists on your local machine, e.g. openvpn-web-ui. If you want to create the archive manually, I listed the files I believe are necessary in the README.md of my fork of this project.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/openvpn-web-ui#30
No description provided.