fix docker
This commit is contained in:
@@ -19,6 +19,12 @@
|
|||||||
# break generating it in the first place — `docker compose run --rm --no-deps
|
# break generating it in the first place — `docker compose run --rm --no-deps
|
||||||
# app php artisan key:generate --show` has to work before `APP_KEY` exists.
|
# app php artisan key:generate --show` has to work before `APP_KEY` exists.
|
||||||
#
|
#
|
||||||
|
# `app` is not published on a host port: routing is Traefik, on the external
|
||||||
|
# `dokploy-network`, terminating TLS before anything reaches this container —
|
||||||
|
# same reason `docker/Caddyfile` trusts `X-Forwarded-*` only from private
|
||||||
|
# ranges. A manual deploy without Dokploy needs its own reverse proxy joined
|
||||||
|
# to that network, or `app` added back to `default` with a published port.
|
||||||
|
#
|
||||||
# The web container is the only one that migrates, so a deploy runs them once
|
# The web container is the only one that migrates, so a deploy runs them once
|
||||||
# rather than once per replica.
|
# rather than once per replica.
|
||||||
###############################################################################
|
###############################################################################
|
||||||
@@ -115,8 +121,24 @@ services:
|
|||||||
<<: *app-env
|
<<: *app-env
|
||||||
# Only here: migrations run once per deploy, not once per container.
|
# Only here: migrations run once per deploy, not once per container.
|
||||||
RUN_MIGRATIONS: "true"
|
RUN_MIGRATIONS: "true"
|
||||||
ports:
|
expose:
|
||||||
- "${APP_PORT:-8000}:80"
|
- "80"
|
||||||
|
networks:
|
||||||
|
- dokploy-network
|
||||||
|
- default
|
||||||
|
labels:
|
||||||
|
- traefik.enable=true
|
||||||
|
- traefik.docker.network=dokploy-network
|
||||||
|
- traefik.http.routers.landing-api-web.rule=Host(`landing-api.pireon.dev`)
|
||||||
|
- traefik.http.routers.landing-api-web.entrypoints=web
|
||||||
|
- traefik.http.routers.landing-api-web.middlewares=redirect-to-https@file
|
||||||
|
- traefik.http.routers.landing-api-web.service=landing-api-web
|
||||||
|
- traefik.http.services.landing-api-web.loadbalancer.server.port=80
|
||||||
|
- traefik.http.routers.landing-api-websecure.rule=Host(`landing-api.pireon.dev`)
|
||||||
|
- traefik.http.routers.landing-api-websecure.entrypoints=websecure
|
||||||
|
- traefik.http.routers.landing-api-websecure.service=landing-api-websecure
|
||||||
|
- traefik.http.routers.landing-api-websecure.tls.certresolver=letsencrypt
|
||||||
|
- traefik.http.services.landing-api-websecure.loadbalancer.server.port=80
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "curl", "-fsS", "http://localhost/up"]
|
test: ["CMD", "curl", "-fsS", "http://localhost/up"]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
@@ -206,3 +228,7 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
pgdata:
|
pgdata:
|
||||||
storage:
|
storage:
|
||||||
|
|
||||||
|
networks:
|
||||||
|
dokploy-network:
|
||||||
|
external: true
|
||||||
|
|||||||
Reference in New Issue
Block a user