generated from alecodes/base-template
chore: add development workflow with compose watch
This commit is contained in:
parent
f937122a2a
commit
9194eccab9
4 changed files with 41 additions and 8 deletions
|
|
@ -1,7 +1,22 @@
|
|||
# FROM ghcr.io/linuxcontainers/debian-slim:latest
|
||||
|
||||
FROM lovasoa/sqlpage
|
||||
FROM ghcr.io/linuxcontainers/debian-slim:latest
|
||||
|
||||
COPY --from=ghcr.io/amacneil/dbmate /usr/local/bin/dbmate /usr/local/bin/dbmate
|
||||
COPY --from=lovasoa/sqlpage:latest /usr/local/bin/sqlpage /usr/local/bin/sqlpage
|
||||
COPY --from=lovasoa/sqlpage:latest /lib/libgcc_s.so.1 /lib/libgcc_s.so.1
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
ENV SQLPAGE_WEB_ROOT=/app
|
||||
ENV SQLPAGE_CONFIGURATION_DIRECTORY=/etc/sqlpage
|
||||
|
||||
RUN addgroup --gid 1000 --system index_user && \
|
||||
adduser --uid 1000 --system --no-create-home --ingroup index_user index_user && \
|
||||
mkdir -p /etc/sqlpage && \
|
||||
touch /etc/sqlpage/sqlpage.db && \
|
||||
chown -R index_user:index_user /etc/sqlpage/sqlpage.db
|
||||
|
||||
COPY --chown=index_user:index_user ./src /app
|
||||
|
||||
USER index_user
|
||||
|
||||
CMD /usr/local/bin/sqlpage
|
||||
|
|
|
|||
|
|
@ -2,13 +2,17 @@ services:
|
|||
index:
|
||||
image: alecodes/index:latest
|
||||
pull_policy: build
|
||||
user: 1000:1000
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: ./docker/Dockerfile
|
||||
develop:
|
||||
watch:
|
||||
- action: sync
|
||||
path: ../src
|
||||
target: /app
|
||||
ports:
|
||||
- 3000:8080
|
||||
env_file: ../.env
|
||||
volumes:
|
||||
- ../src:/app
|
||||
|
||||
db:
|
||||
image: postgres:17
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue