Compare commits
8 Commits
master
...
145-build-
| Author | SHA1 | Date | |
|---|---|---|---|
| 7d999aae2c | |||
| 8d0adf7edd | |||
| 5e041dfa89 | |||
| 48e1a45242 | |||
| 0ee42bac29 | |||
| 928804fce1 | |||
| 6c3e7a302d | |||
| e38e22a064 |
8
Makefile
8
Makefile
@ -48,7 +48,7 @@ endif
|
|||||||
-rm -rf backend/.stack-work
|
-rm -rf backend/.stack-work
|
||||||
-rm -rf bin/
|
-rm -rf bin/
|
||||||
--clean-backend-deps:
|
--clean-backend-deps:
|
||||||
-rf -rf backend/.stack
|
-rm -rf backend/.stack
|
||||||
|
|
||||||
|
|
||||||
# TODO: only release when build and tests are passing!!!
|
# TODO: only release when build and tests are passing!!!
|
||||||
@ -82,7 +82,7 @@ start-%:
|
|||||||
.PHONY: shell-%
|
.PHONY: shell-%
|
||||||
# HELP(shell-$SERVICE): launch a (bash) shell inside a given service
|
# HELP(shell-$SERVICE): launch a (bash) shell inside a given service
|
||||||
shell-%:
|
shell-%:
|
||||||
docker compose run --build --no-deps --entrypoint="$(ENTRYPOINT)" $*
|
docker compose run --build --no-deps $* $(ENTRYPOINT)
|
||||||
.PHONY: ghci
|
.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
|
# 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)
|
ghci: ENTRYPOINT=stack ghci $(SRC)
|
||||||
@ -91,11 +91,11 @@ ghci: shell-backend ;
|
|||||||
.PHONY: stop
|
.PHONY: stop
|
||||||
# HELP: stop all services
|
# HELP: stop all services
|
||||||
stop:
|
stop:
|
||||||
docker compose down
|
docker compose down --volumes
|
||||||
.PHONY: stop-%
|
.PHONY: stop-%
|
||||||
# HELP(stop-$SERVICE): stop a given service
|
# HELP(stop-$SERVICE): stop a given service
|
||||||
stop-%:
|
stop-%:
|
||||||
docker compose down $*
|
docker compose down --volumes $*
|
||||||
.PHONY: kill-%
|
.PHONY: kill-%
|
||||||
# HELP(kill-$SERVICE): kill a given service the hard way. Use this if the servive does not respond to stop.
|
# HELP(kill-$SERVICE): kill a given service the hard way. Use this if the servive does not respond to stop.
|
||||||
kill-%:
|
kill-%:
|
||||||
|
|||||||
@ -33,8 +33,4 @@ ENV PROJECT_DIR=${PROJECT_DIR}
|
|||||||
# RUN mkdir -p "${PROJECT_DIR}"; chmod -R 777 "${PROJECT_DIR}"
|
# RUN mkdir -p "${PROJECT_DIR}"; chmod -R 777 "${PROJECT_DIR}"
|
||||||
WORKDIR ${PROJECT_DIR}
|
WORKDIR ${PROJECT_DIR}
|
||||||
ENV HOME=${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}
|
|
||||||
@ -61,10 +61,10 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- POSTGRES_HOST_AUTH_METHOD=trust
|
- POSTGRES_HOST_AUTH_METHOD=trust
|
||||||
volumes:
|
volumes:
|
||||||
- ./docker/postgres/pg_hba.conf:/tmp/pg_hba.conf:ro
|
- ./postgres/pg_hba.conf:/tmp/pg_hba.conf:ro
|
||||||
- ./docker/postgres/postgresql.conf:/tmp/postgresql.conf:ro
|
- ./postgres/postgresql.conf:/tmp/postgresql.conf:ro
|
||||||
- ./docker/postgres/pgconfig.sh:/docker-entrypoint-initdb.d/_pgconfig.sh:ro
|
- ./postgres/pgconfig.sh:/docker-entrypoint-initdb.d/_pgconfig.sh:ro
|
||||||
- ./docker/postgres/schema.sql:/docker-entrypoint-initdb.d/schema.sql:ro
|
- ./postgres/schema.sql:/docker-entrypoint-initdb.d/schema.sql:ro
|
||||||
|
|
||||||
memcached:
|
memcached:
|
||||||
image: docker.io/library/memcached:latest
|
image: docker.io/library/memcached:latest
|
||||||
|
|||||||
@ -9,14 +9,18 @@ node_modules: package.json package-lock.json
|
|||||||
npm install --cache .npm --prefer-offline
|
npm install --cache .npm --prefer-offline
|
||||||
package-lock.json: package.json
|
package-lock.json: package.json
|
||||||
npm install --cache .npm --prefer-offline
|
npm install --cache .npm --prefer-offline
|
||||||
|
.PHONY: static
|
||||||
static: node_modules assets esbuild.config.mjs jsconfig.json postcss.config.js
|
static: node_modules assets esbuild.config.mjs jsconfig.json postcss.config.js
|
||||||
echo "$${PROJECT_DIR}"
|
|
||||||
npm run build
|
npm run build
|
||||||
|
.PHONY: well-known
|
||||||
well-known: static ;
|
well-known: static ;
|
||||||
|
|
||||||
|
.PHONY: assets
|
||||||
assets: assets/favicons assets/icons;
|
assets: assets/favicons assets/icons;
|
||||||
|
.PHONY: assets/favicons
|
||||||
assets/favicons:
|
assets/favicons:
|
||||||
./utils/faviconize.pl assets/favicon.svg long assets/favicons
|
./utils/faviconize.pl assets/favicon.svg long assets/favicons
|
||||||
|
.PHONY: assets/icons
|
||||||
assets/icons: node_modules assets/icons-src/fontawesome.json
|
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/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
|
./utils/renamer.pl node_modules/@fortawesome/fontawesome-free/svgs/regular assets/icons-src/fontawesome.json assets/icons/fradrive
|
||||||
|
|||||||
3
postgres/pg_hba.conf
Normal file
3
postgres/pg_hba.conf
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
local all all trust
|
||||||
|
host all all 0.0.0.0/0 trust
|
||||||
|
host all all ::1/128 trust
|
||||||
6
postgres/pgconfig.sh
Normal file
6
postgres/pgconfig.sh
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#!/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."
|
||||||
6
postgres/postgresql.conf
Normal file
6
postgres/postgresql.conf
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
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
|
||||||
5
postgres/schema.sql
Normal file
5
postgres/schema.sql
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
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;
|
||||||
Loading…
Reference in New Issue
Block a user