mirror of
https://github.com/UiO-Gaming/uiogaming.no.git
synced 2026-11-05 13:56:47 +01:00
Keep .env and local build artifacts out of the Docker image
Without a .dockerignore, COPY . . baked the .env file (including the webhook secret) into the image and overwrote the container's node_modules with the host's. Pass public build-time values as build args and provide the rest at runtime through env_file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d03278ef0d
commit
1f82345a2f
3 files changed
+30
-2
No files matched your search
+9
-1
@@ -1,7 +1,15 @@
|
||||
services:
|
||||
uiogaming.no:
|
||||
container_name: uiogaming.no
|
||||
build: .
|
||||
build:
|
||||
context: .
|
||||
# Values are read from .env
|
||||
args:
|
||||
NEXT_PUBLIC_SANITY_PROJECT_ID: ${NEXT_PUBLIC_SANITY_PROJECT_ID}
|
||||
NEXT_PUBLIC_SANITY_DATASET: ${NEXT_PUBLIC_SANITY_DATASET}
|
||||
NEXT_PUBLIC_UMAMI_SRC: ${NEXT_PUBLIC_UMAMI_SRC}
|
||||
NEXT_PUBLIC_UMAMI_WEBSITE_ID: ${NEXT_PUBLIC_UMAMI_WEBSITE_ID}
|
||||
env_file: .env
|
||||
ports:
|
||||
- 9000:9000
|
||||
environment:
|
||||
|
||||
Reference in new issue
Block a user