Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrades, secrets, and ONBUILD images (version 3.0.0) (#43)
* improve and document BOINC server development workflow * readme tweaks * fix headings * fix variable * make the files built in the local volume have non-root permissions (and consequently make everything in Docker containers run as a non-root user, which has been requested for a while) * fix accidentally updated submodule * temp make default TAG non-b2d so demo works * add upgrade instructions * fix some stuff rebuilding unnecessarily * update -b2d to work with new setup as well * cleanup .env * remove unnecessary command * upgrade to debian:stretch and mariadb:10; cleanup handling of "secrets" * minor cleanup * remove dev workflow since it doesnt really work right yet * use multi-stage build to remove redundant Dockerfile and Dockefile-b2d * remove leftover dev workflow file * make images use ONBUILD for better user customization * update docs, add secrets section * fix secrets volume being overwritten, update example project
- Loading branch information
Showing
35 changed files
with
531 additions
and
576 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,3 +1,37 @@ | |||
# controls which TAGs to build. should be either "TAG=-b2d" to build the server with | |||
# boinc2docker installed, or blank ("TAG=") to build the vanilla server | |||
TAG=-b2d | |||
|
|||
|
|||
|
|||
# ----------------------------------------------------------------------- | |||
# the following can be changed even with a project running, and will be | |||
# applied the next time you run `docker compose up -d` | |||
# ----------------------------------------------------------------------- | |||
|
|||
# the URL the server thinks its at | |||
URL_BASE=http://127.0.0.1 | URL_BASE=http://127.0.0.1 | ||
|
|||
|
|||
|
|||
# ----------------------------------------------------------------------------- | |||
# the following must be set before you build a project, and cannot be changed | |||
# afterwards | |||
# ----------------------------------------------------------------------------- | |||
|
|||
# the project name | |||
PROJECT=boincserver | PROJECT=boincserver | ||
TAG=-b2d |
|
||
# the user who builds the server source and runs the BOINC daemons | |||
BOINC_USER=boincadm | |||
|
|||
# the folder where the project is created | |||
PROJECT_ROOT=/home/boincadm/project | |||
|
|||
|
|||
|
|||
# -------------------------------------------------- | |||
# used for development, not for general modification | |||
# -------------------------------------------------- | |||
DEFAULTARGS=-defaultargs | |||
VERSION=latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,51 +1,58 @@ | |||
version: "3" | version: "3.4" | ||
|
|
||
volumes: | volumes: | ||
mysql: | mysql: | ||
project: | project: | ||
results: | results: | ||
secrets: | |||
|
|
||
services: | services: | ||
mysql: | mysql: | ||
image: boinc/server_mysql:latest | image: boinc/server_mysql:$VERSION$DEFAULTARGS | ||
build: images/mysql | build: | ||
network_mode: bridge | context: images/mysql | ||
target: mysql$DEFAULTARGS | |||
volumes: | volumes: | ||
- "mysql:/var/lib/mysql" | - "mysql:/var/lib/mysql" | ||
environment: | |||
- MYSQL_ROOT_PASSWORD= | |||
- MYSQL_ALLOW_EMPTY_PASSWORD=yes | |||
|
|
||
makeproject: | makeproject: | ||
image: boinc/server_makeproject:latest$TAG | image: boinc/server_makeproject:$VERSION$TAG$DEFAULTARGS | ||
build: | build: | ||
context: images/makeproject | context: images/makeproject | ||
dockerfile: Dockerfile$TAG | target: makeproject$DEFAULTARGS | ||
network_mode: bridge | args: | ||
links: | - TAG | ||
- mysql | - BOINC_USER | ||
- PROJECT_ROOT | |||
volumes: | volumes: | ||
- "project:/root/project.dst" | - "project:$PROJECT_ROOT.dst" | ||
- "secrets:/run/secrets" | |||
hostname: makeproject | |||
environment: | environment: | ||
- URL_BASE=$URL_BASE | - URL_BASE | ||
- PROJECT=$PROJECT | - PROJECT | ||
|
|
||
apache: | apache: | ||
image: boinc/server_apache:latest$TAG | image: boinc/server_apache:$VERSION$TAG$DEFAULTARGS | ||
build: | build: | ||
context: images/apache | context: images/apache | ||
dockerfile: Dockerfile$TAG | target: apache$DEFAULTARGS | ||
args: | |||
- TAG | |||
- BOINC_USER | |||
- PROJECT_ROOT | |||
hostname: $PROJECT | hostname: $PROJECT | ||
network_mode: bridge | depends_on: | ||
links: | - mysql | ||
- mysql | |||
volumes: | volumes: | ||
- "project:/root/project" | - "project:/home/$BOINC_USER/project" | ||
- "results:/results" | - "results:/results" | ||
- "/var/run/docker.sock:/var/run/docker.sock" | - "secrets:/run/secrets" | ||
- "/dev/null:/run/secrets/keys/code_sign_private" | |||
- "/var/run/docker.sock:/var/run/docker.sock" | |||
ports: | ports: | ||
- "80:80" | - "80:80" | ||
tty: true | tty: true | ||
environment: | environment: | ||
- URL_BASE=$URL_BASE | - URL_BASE | ||
- PROJECT=$PROJECT | - PROJECT |
Oops, something went wrong.