Update Dockerfile and docker-compose for config.json and Mailpit integration
This commit is contained in:
+2
-1
@@ -29,6 +29,7 @@ WORKDIR /app
|
|||||||
|
|
||||||
COPY --from=builder /app/build/visione-backend /app/visione-backend
|
COPY --from=builder /app/build/visione-backend /app/visione-backend
|
||||||
COPY --from=builder /app/build/openapi /app/build/openapi
|
COPY --from=builder /app/build/openapi /app/build/openapi
|
||||||
|
COPY --from=builder /app/config.json /app/config.json
|
||||||
COPY --from=builder /app/migrations /app/migrations
|
COPY --from=builder /app/migrations /app/migrations
|
||||||
|
|
||||||
EXPOSE 5555
|
EXPOSE 5555
|
||||||
@@ -36,4 +37,4 @@ EXPOSE 5555
|
|||||||
RUN chown -R 1000:1000 /app
|
RUN chown -R 1000:1000 /app
|
||||||
USER 1000:1000
|
USER 1000:1000
|
||||||
|
|
||||||
ENTRYPOINT ["/app/visione-backend"]
|
ENTRYPOINT ["/app/visione-backend"]
|
||||||
|
|||||||
@@ -134,13 +134,13 @@ client address.
|
|||||||
## Dokploy
|
## Dokploy
|
||||||
|
|
||||||
Use `docker-compose.dev.yml` as the Dokploy compose path for a self-contained
|
Use `docker-compose.dev.yml` as the Dokploy compose path for a self-contained
|
||||||
backend deployment with MySQL and MailHog. Configure the public domain in
|
backend deployment with MySQL and a local SMTP catcher. Configure the public
|
||||||
Dokploy against service `backend` and container port `5555`.
|
domain in Dokploy against service `backend` and container port `5555`.
|
||||||
|
|
||||||
Before deploying, create an Advanced Mount named `config.json` in Dokploy and
|
The runtime image includes `config.json`; override environment-specific values
|
||||||
paste the repository `config.json` content into it. The compose file mounts it
|
with Dokploy environment variables. The SMTP catcher service keeps the internal
|
||||||
from `../files/config.json` so AutoDeploy does not depend on bind mounts from a
|
name `mailhog` for compatibility, but uses the multi-architecture Mailpit image
|
||||||
freshly cloned repository.
|
to avoid `exec format error` failures on ARM servers.
|
||||||
|
|
||||||
Set `MYSQL_PASSWORD`, `MYSQL_ROOT_PASSWORD` and any other environment-specific
|
Set `MYSQL_PASSWORD`, `MYSQL_ROOT_PASSWORD` and any other environment-specific
|
||||||
values in Dokploy environment variables.
|
values in Dokploy environment variables.
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ services:
|
|||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
- ../files/config.json:/app/config.json:ro
|
|
||||||
- uploads-data:/app/uploads
|
- uploads-data:/app/uploads
|
||||||
environment:
|
environment:
|
||||||
DB_HOST: ${DB_HOST:-mysql}
|
DB_HOST: ${DB_HOST:-mysql}
|
||||||
@@ -46,7 +45,7 @@ services:
|
|||||||
start_period: 20s
|
start_period: 20s
|
||||||
|
|
||||||
mailhog:
|
mailhog:
|
||||||
image: mailhog/mailhog:v1.0.1
|
image: axllent/mailpit:latest
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
expose:
|
expose:
|
||||||
- "1025"
|
- "1025"
|
||||||
|
|||||||
Reference in New Issue
Block a user