Compare commits

..

No commits in common. "145-build-system-rewrite" and "master" have entirely different histories.

8 changed files with 14 additions and 34 deletions

View File

@ -48,7 +48,7 @@ endif
-rm -rf backend/.stack-work
-rm -rf bin/
--clean-backend-deps:
-rm -rf backend/.stack
-rf -rf backend/.stack
# TODO: only release when build and tests are passing!!!
@ -82,7 +82,7 @@ start-%:
.PHONY: shell-%
# HELP(shell-$SERVICE): launch a (bash) shell inside a given service
shell-%:
docker compose run --build --no-deps $* $(ENTRYPOINT)
docker compose run --build --no-deps --entrypoint="$(ENTRYPOINT)" $*
.PHONY: ghci
# HELP: launch ghci instance. Use in combination with SRC to specify the modules to be loaded by ghci: make ghci SRC=src/SomeModule.hs
ghci: ENTRYPOINT=stack ghci $(SRC)
@ -91,11 +91,11 @@ ghci: shell-backend ;
.PHONY: stop
# HELP: stop all services
stop:
docker compose down --volumes
docker compose down
.PHONY: stop-%
# HELP(stop-$SERVICE): stop a given service
stop-%:
docker compose down --volumes $*
docker compose down $*
.PHONY: kill-%
# HELP(kill-$SERVICE): kill a given service the hard way. Use this if the servive does not respond to stop.
kill-%:

View File

@ -33,4 +33,8 @@ ENV PROJECT_DIR=${PROJECT_DIR}
# RUN mkdir -p "${PROJECT_DIR}"; chmod -R 777 "${PROJECT_DIR}"
WORKDIR ${PROJECT_DIR}
ENV HOME=${PROJECT_DIR}
ENV STACK_ROOT="${PROJECT_DIR}/.stack"
ENV STACK_ROOT="${PROJECT_DIR}/.stack"
ENV STACK_SRC=""
ENV STACK_ENTRY="ghci ${STACK_SRC}"
ENTRYPOINT stack ${STACK_ENTRY}

View File

@ -61,10 +61,10 @@ services:
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
volumes:
- ./postgres/pg_hba.conf:/tmp/pg_hba.conf:ro
- ./postgres/postgresql.conf:/tmp/postgresql.conf:ro
- ./postgres/pgconfig.sh:/docker-entrypoint-initdb.d/_pgconfig.sh:ro
- ./postgres/schema.sql:/docker-entrypoint-initdb.d/schema.sql:ro
- ./docker/postgres/pg_hba.conf:/tmp/pg_hba.conf:ro
- ./docker/postgres/postgresql.conf:/tmp/postgresql.conf:ro
- ./docker/postgres/pgconfig.sh:/docker-entrypoint-initdb.d/_pgconfig.sh:ro
- ./docker/postgres/schema.sql:/docker-entrypoint-initdb.d/schema.sql:ro
memcached:
image: docker.io/library/memcached:latest

View File

@ -9,18 +9,14 @@ node_modules: package.json package-lock.json
npm install --cache .npm --prefer-offline
package-lock.json: package.json
npm install --cache .npm --prefer-offline
.PHONY: static
static: node_modules assets esbuild.config.mjs jsconfig.json postcss.config.js
echo "$${PROJECT_DIR}"
npm run build
.PHONY: well-known
well-known: static ;
.PHONY: assets
assets: assets/favicons assets/icons;
.PHONY: assets/favicons
assets/favicons:
./utils/faviconize.pl assets/favicon.svg long assets/favicons
.PHONY: assets/icons
assets/icons: node_modules assets/icons-src/fontawesome.json
./utils/renamer.pl node_modules/@fortawesome/fontawesome-free/svgs/solid assets/icons-src/fontawesome.json assets/icons/fradrive
./utils/renamer.pl node_modules/@fortawesome/fontawesome-free/svgs/regular assets/icons-src/fontawesome.json assets/icons/fradrive

View File

@ -1,3 +0,0 @@
local all all trust
host all all 0.0.0.0/0 trust
host all all ::1/128 trust

View File

@ -1,6 +0,0 @@
#!/usr/bin/env bash
cat /tmp/pg_hba.conf > /var/lib/postgresql/data/pg_hba.conf
cat /tmp/postgresql.conf > /var/lib/postgresql/data/postgresql.conf
echo "Custom pg_hba.conf and postgresql.conf successfully deployed."

View File

@ -1,6 +0,0 @@
listen_addresses='*'
unix_socket_permissions=0700
max_connections=9990
shared_preload_libraries=pg_stat_statements
session_preload_libraries=auto_explain
auto_explain.log_min_duration=100ms

View File

@ -1,5 +0,0 @@
CREATE USER uniworx WITH SUPERUSER PASSWORD 'uniworx';
CREATE DATABASE uniworx_test;
GRANT ALL ON DATABASE uniworx_test TO uniworx;
CREATE DATABASE uniworx;
GRANT ALL ON DATABASE uniworx TO uniworx;