This commit is contained in:
parent
44512bc616
commit
f4ef3f501d
|
@ -6,12 +6,11 @@ steps:
|
||||||
environment:
|
environment:
|
||||||
- DATABASE_URL=postgres://postgres:password@database:5432/postgres
|
- DATABASE_URL=postgres://postgres:password@database:5432/postgres
|
||||||
commands:
|
commands:
|
||||||
- curl -fsSL https://deb.nodesource.com/setup_16.x | bash - &&\
|
# - curl -fsSL https://deb.nodesource.com/setup_16.x | bash - &&\
|
||||||
- apt update && apt-get -y --no-install-recommends install nodejs tar gpg curl wget
|
# - apt update && apt-get -y --no-install-recommends install nodejs tar gpg curl wget
|
||||||
- rustup component add rustfmt
|
- rustup component add rustfmt
|
||||||
- rustup component add clippy
|
- rustup component add clippy
|
||||||
# - make dev-env
|
- make db.migrate
|
||||||
# - make migrate
|
|
||||||
- make lint
|
- make lint
|
||||||
- make test
|
- make test
|
||||||
- make release
|
- make release
|
||||||
|
@ -59,45 +58,8 @@ steps:
|
||||||
# - scripts/bin-publish.sh publish master latest $DUMBSERVE_PASSWORD
|
# - scripts/bin-publish.sh publish master latest $DUMBSERVE_PASSWORD
|
||||||
# secrets: [RELEASE_BOT_GPG_SIGNING_KEY, DUMBSERVE_PASSWORD, GPG_PASSWORD]
|
# secrets: [RELEASE_BOT_GPG_SIGNING_KEY, DUMBSERVE_PASSWORD, GPG_PASSWORD]
|
||||||
#
|
#
|
||||||
#services:
|
services:
|
||||||
# database:
|
database:
|
||||||
# image: postgres
|
image: postgres
|
||||||
# environment:
|
environment:
|
||||||
# - POSTGRES_PASSWORD=password
|
- POSTGRES_PASSWORD=password
|
||||||
#
|
|
||||||
# forms-postgres:
|
|
||||||
# image: postgres
|
|
||||||
# environment:
|
|
||||||
# - POSTGRES_PASSWORD=password
|
|
||||||
#
|
|
||||||
# librepages-forms:
|
|
||||||
# image: forgeflux/forgeflux-forms
|
|
||||||
# command: forms serve
|
|
||||||
# environment:
|
|
||||||
# - LPFORMS_SOURCE_CODE=https://git.batsense.net/LibrePages/forms
|
|
||||||
# - LPFORMS_SERVER__PROXY_HAS_TLS=false
|
|
||||||
# - LPFORMS_DEBUG=false
|
|
||||||
# - LPFORMS_SERVER_URL_PREFIX=""
|
|
||||||
# - LPFORMS_SERVER_DOMAIN=forms.librepages.test
|
|
||||||
# - LPFORMS_SERVER_IP=0.0.0.0
|
|
||||||
# - LPFORMS_SERVER_PROXY_HAS_TLS=false
|
|
||||||
# - LPFORMS_DASH_API_KEY=longrandomlygeneratedpassword
|
|
||||||
# - LPFORMS_DATABASE_POOL=2
|
|
||||||
# - PORT=6000
|
|
||||||
# - DATABASE_URL=postgres://postgres:password@forms-postgres:5432/postgres
|
|
||||||
#
|
|
||||||
# librepages-conductor:
|
|
||||||
# image: forgeflux/forgeflux-conductor
|
|
||||||
# command: conductor serve
|
|
||||||
# environment:
|
|
||||||
# - LPCONDUCTOR_SERVER__PROXY_HAS_TLS=false
|
|
||||||
# - LPCONDUCTOR_DEBUG=false
|
|
||||||
# - LPCONDUCTOR_CONDUCTOR=dummy
|
|
||||||
# - LPCONDUCTOR_SERVER_URL_PREFIX=""
|
|
||||||
# - LPCONDUCTOR_SERVER_DOMAIN=librepages.test
|
|
||||||
# - LPCONDUCTOR_SERVER_IP=0.0.0.0
|
|
||||||
# - LPCONDUCTOR_SERVER_PROXY_HAS_TLS=false
|
|
||||||
# - LPCONDUCTOR_SERVER_PORT=7000
|
|
||||||
# - LPCONDUCTOR_SOURCE_CODE=https://example.org
|
|
||||||
# - LPCONDUCTOR_CREDS_TOKEN=longrandomlygeneratedpassword
|
|
||||||
# - PORT=5000
|
|
||||||
|
|
33
Makefile
33
Makefile
|
@ -1,3 +1,17 @@
|
||||||
|
define deploy_dependencies ## deploy dependencies
|
||||||
|
@-docker create --name ${db} \
|
||||||
|
-e POSTGRES_PASSWORD=password \
|
||||||
|
-p 5432:5432 \
|
||||||
|
postgres
|
||||||
|
docker start ${db}
|
||||||
|
endef
|
||||||
|
|
||||||
|
|
||||||
|
define run_migrations ## run database migrations
|
||||||
|
cd utils/db-migrations/ && unset DATABASE_URL && cargo build
|
||||||
|
cd utils/db-migrations/ && cargo run
|
||||||
|
endef
|
||||||
|
|
||||||
#define cache_bust ## run cache_busting program
|
#define cache_bust ## run cache_busting program
|
||||||
# npm run sass
|
# npm run sass
|
||||||
# cd utils/cache-bust && cargo run
|
# cd utils/cache-bust && cargo run
|
||||||
|
@ -17,6 +31,13 @@ check: ## Check for syntax errors on all workspaces
|
||||||
clean: ## Clean all build artifacts and dependencies
|
clean: ## Clean all build artifacts and dependencies
|
||||||
@cargo clean
|
@cargo clean
|
||||||
|
|
||||||
|
db.migrate: ## run migrations
|
||||||
|
$(call run_migrations)
|
||||||
|
|
||||||
|
db.sqlx.offline: ## prepare sqlx offline data
|
||||||
|
cargo sqlx prepare \
|
||||||
|
--database-url=${DATABASE_URL} -- \
|
||||||
|
--all-features
|
||||||
|
|
||||||
#dev-env: ## Download development dependencies
|
#dev-env: ## Download development dependencies
|
||||||
# npm install
|
# npm install
|
||||||
|
@ -36,6 +57,18 @@ docker.publish: docker.build ## Build and publish docker images
|
||||||
docker push forgeflux/forgeflux:latest
|
docker push forgeflux/forgeflux:latest
|
||||||
docker push forgeflux/forgeflux:0.1.0
|
docker push forgeflux/forgeflux:0.1.0
|
||||||
|
|
||||||
|
|
||||||
|
env.db: ## Deploy dependencies
|
||||||
|
$(call deploy_dependencies)
|
||||||
|
sleep 5
|
||||||
|
$(call run_migrations)
|
||||||
|
|
||||||
|
env.db.recreate: ## Deploy dependencies from scratch
|
||||||
|
@-docker rm -f ${db}
|
||||||
|
$(call deploy_dependencies)
|
||||||
|
sleep 5
|
||||||
|
$(call run_migrations)
|
||||||
|
|
||||||
lint: ## Lint codebase
|
lint: ## Lint codebase
|
||||||
cargo fmt -v --all -- --emit files
|
cargo fmt -v --all -- --emit files
|
||||||
cargo clippy --workspace --tests --all-features
|
cargo clippy --workspace --tests --all-features
|
||||||
|
|
Loading…
Reference in a new issue