Compare commits
3 Commits
fa5fe60091
...
1321e8a308
| Author | SHA1 | Date | |
|---|---|---|---|
| 1321e8a308 | |||
| 1d1c31f7a9 | |||
| 58c3c5e526 |
54
Makefile
54
Makefile
@ -49,7 +49,7 @@ help:
|
||||
@if [ -z "$$(which perl 2>/dev/null)" ] ; then \
|
||||
$(CONTAINER_FGRUN) .:/mnt 'debian:12.5' '/mnt/utils/makehelp.pl' '/mnt/Makefile' ; \
|
||||
else \
|
||||
utils/makehelp.pl Makefile ; \
|
||||
utils/makehelp.pl Makefile ; \
|
||||
fi
|
||||
|
||||
.PHONY: clean
|
||||
@ -126,14 +126,6 @@ test: test-frontend test-backend i18n-check;
|
||||
# HELP(compile-frontend): compile frontend
|
||||
--compile-frontend: static well-known;
|
||||
|
||||
.PHONY: serve-frontend
|
||||
# HELP: serve frontend (watch file changes)
|
||||
serve-frontend:
|
||||
$(MAKE) -- --containerized---compile-frontend WATCH=--watch
|
||||
|
||||
# --serve-frontend: WATCH=--watch
|
||||
# --serve-frontend: --compile-frontend;
|
||||
|
||||
# HELP(lint-frontend): lint frontend
|
||||
--lint-frontend: eslint.config.js
|
||||
npx -- eslint frontend/src $(FIX)
|
||||
@ -172,22 +164,6 @@ well-known: static;
|
||||
%-backend: FRADRIVE_SERVICE=backend
|
||||
%-backend: --image-build --containerized---%-backend;
|
||||
|
||||
# TODO: to be deprecated by start-%
|
||||
.PHONY: serve-backend
|
||||
# HELP: serve backend
|
||||
serve-backend:
|
||||
DEV_PORT_HTTP=`utils/next_free_port.pl 3000 | tee .dev-port-http`; \
|
||||
DEV_PORT_HTTPS=`utils/next_free_port.pl 3443 | tee .dev-port-https`; \
|
||||
$(MAKE) -- --containerized---serve-dev-backend DEV_PORT_HTTP=$${DEV_PORT_HTTP} DEV_PORT_HTTPS=$${DEV_PORT_HTTPS}
|
||||
# DEV_PORT_HTTP=`grep 'https:' develop/$(DATE)/backend/$(CONTAINER_ID) | sed 's/.*://'`; \
|
||||
# DEV_PORT_HTTPS=`grep 'https:' develop/$(DATE)/backend/$(CONTAINER_ID) | sed 's/.*://'`; \
|
||||
# DEVELOP=$(MAKE) develop/
|
||||
--serve-dev-backend: start.sh
|
||||
DEV_PORT_HTTP=`cat .dev-port-http`; \
|
||||
DEV_PORT_HTTPS=`cat .dev-port-https`; \
|
||||
./start.sh
|
||||
# ./utils/watchrun.sh develop/ ./start.sh
|
||||
|
||||
# HELP(compile-backend): compile backend
|
||||
--compile-backend:
|
||||
stack build --fast --work-dir .stack-work-build --profile --library-profiling --executable-profiling --flag uniworx:-library-only --local-bin-path $$(pwd)/bin $(stackopts)
|
||||
@ -307,33 +283,7 @@ image-rebuild-%:
|
||||
fi \
|
||||
fi
|
||||
|
||||
# .PHONY: new-backend
|
||||
# new-backend:
|
||||
# LAST_DATE=`ls -1 develop | tail -n1`
|
||||
# if [[ -z "$${LAST_DATE}" || -e `ls develop/$${LAST_DATE}/database` ]]; then \
|
||||
# mkdir -p develop/$$(date +'%Y-%m-%dT%H-%M-%S') \
|
||||
# fi
|
||||
# serve-backend
|
||||
|
||||
#new-database:
|
||||
# mkdir -p develop/$$(date +'%Y-%m-%dT%H-%M-%S')
|
||||
# $(MAKE) serve-database
|
||||
|
||||
# TODO: work in progress
|
||||
# - compute used ports and provide as env vars
|
||||
# - start container in detached mode
|
||||
# - save container id with ports as content as file
|
||||
# .PHONY: serve-%
|
||||
# serve-backend:
|
||||
# DEV_PORT_HTTP=`docker/backend/dev_port.pl 3000 | tee develop/$${DATE}/fradrive.backend.$${DATE}`; \
|
||||
# DEV_PORT_HTTPS=`docker/backend/dev_port.pl 3443 | tee .dev-port-https`; \
|
||||
# $(MAKE) -- --containerized---start-dev-backend DEV_PORT_HTTP=$${DEV_PORT_HTTP} DEV_PORT_HTTPS=$${DEV_PORT_HTTPS}
|
||||
#--serve-dev-backend: start.sh
|
||||
# DEV_PORT_HTTP=`grep 'https:' develop/$(DATE)/backend/$(CONTAINER_ID) | sed 's/.*://'`; \
|
||||
# DEV_PORT_HTTPS=`grep 'https:' develop/$(DATE)/backend/$(CONTAINER_ID) | sed 's/.*://'`; \
|
||||
# ./utils/watchrun.sh develop/ ./start.sh
|
||||
|
||||
DATE := $(shell date +'%Y-%m-%dT%H-%M-%S')
|
||||
DATE := $(shell date +'%Y-%m-%dT%H-%M-%S')
|
||||
|
||||
SET_DEVELOP = $(eval DEVELOP=develop/`ls -1 develop | tail -n1`)
|
||||
NEW_DEVELOP = $(eval DEVELOP=develop/$$(DATE))
|
||||
|
||||
@ -123,7 +123,7 @@ auth-pw-hash:
|
||||
database:
|
||||
user: "_env:PGUSER:uniworx"
|
||||
password: "_env:PGPASS:uniworx"
|
||||
host: "_env:PGHOST:localhost"
|
||||
host: "_env:PGHOST:host.docker.internal"
|
||||
port: "_env:PGPORT:5432"
|
||||
# See config/test-settings.yml for an override during tests
|
||||
database: "_env:PGDATABASE:uniworx"
|
||||
@ -181,7 +181,7 @@ smtp:
|
||||
limit: "_env:SMTPLIMIT:10"
|
||||
|
||||
widget-memcached:
|
||||
host: "_env:WIDGET_MEMCACHED_HOST:localhost"
|
||||
host: "_env:WIDGET_MEMCACHED_HOST:host.docker.internal"
|
||||
port: "_env:WIDGET_MEMCACHED_PORT:11211"
|
||||
auth: []
|
||||
limit: "_env:WIDGET_MEMCACHED_LIMIT:1024"
|
||||
@ -190,7 +190,7 @@ widget-memcached:
|
||||
expiration: "_env:WIDGET_MEMCACHED_EXPIRATION:3600"
|
||||
|
||||
session-memcached:
|
||||
host: "_env:SESSION_MEMCACHED_HOST:localhost"
|
||||
host: "_env:SESSION_MEMCACHED_HOST:host.docker.internal"
|
||||
port: "_env:SESSION_MEMCACHED_PORT:11211"
|
||||
auth: []
|
||||
limit: "_env:SESSION_MEMCACHED_LIMIT:1024"
|
||||
@ -200,7 +200,7 @@ session-memcached:
|
||||
|
||||
# TODO: this one seems to be required!
|
||||
memcached:
|
||||
host: "_env:MEMCACHED_HOST:localhost"
|
||||
host: "_env:MEMCACHED_HOST:host.docker.internal"
|
||||
port: "_env:MEMCACHED_PORT:11211"
|
||||
auth: []
|
||||
limit: "_env:MEMCACHED_LIMIT:1024"
|
||||
|
||||
@ -23,7 +23,7 @@ ENV STACK_ROOT="${PROJECT_DIR}/.stack"
|
||||
RUN make -- --.stack STACK_ROOT=${STACK_ROOT} IN_CONTAINER=true
|
||||
# RUN stack build yesod-bin
|
||||
|
||||
ENV FRADRIVE_MAKE_TARGET=serve-backend
|
||||
ENV FRADRIVE_MAKE_TARGET=start-backend
|
||||
ENTRYPOINT make -- ${FRADRIVE_MAKE_TARGET} STACK_ROOT="${STACK_ROOT}" IN_CONTAINER=true CONTAINER_FILE="${CONTAINER_FILE}"
|
||||
|
||||
EXPOSE 3000/tcp
|
||||
|
||||
Loading…
Reference in New Issue
Block a user