-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
427 additions
and
448 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,12 @@ | ||
FROM fireantik/spa-prod:latest | ||
|
||
# When you wish to configure using environment variables | ||
ENV SPA_PROD_ROOT /app | ||
ENV SPA_PROD_INDEX /app/index.html | ||
ENV SPA_PROD_PRESET cra | ||
|
||
# When you wish to configure using JSON file | ||
# COPY ./config.json /app/config.json | ||
# CMD /usr/local/bin/node /spa-prod/dist/cli.js --config /app/config.json | ||
FROM fireantik/spa-prod | ||
|
||
# If you wish to use a different port | ||
# EXPOSE 8080 | ||
# ENV SPA_PROD_PORT 8080 | ||
# HEALTHCHECK --interval=5s --timeout=3s --retries=3 CMD curl --fail http://localhost:8080/healthz || exit 1 | ||
|
||
# Copy built SPA files | ||
COPY ./cra/build /app | ||
# Copy configuration | ||
COPY ./config.js /app/spa-prod.config.js | ||
ENV SPA_PROD_CONFIG /app/spa-prod.config.js | ||
|
||
# Copy built files from dist directory | ||
COPY ./dist /app/dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
module.exports = { | ||
port: 80, | ||
folders: [ | ||
{ | ||
root: 'cra/build/static', | ||
cache: 'immutable', | ||
}, | ||
{ | ||
root: 'cra/build', | ||
cache: 'short', | ||
}, | ||
], | ||
index: 'cra/build/index.html', | ||
healthcheck: [ | ||
{ | ||
path: '/healthz', | ||
data: function() { | ||
return { | ||
now: new Date().toISOString(), | ||
} | ||
}, | ||
}, | ||
], | ||
envs: ['NODE_ENV', 'BASE_URL'], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,16 @@ | ||
module.exports = { | ||
port: 80, | ||
port: 8080, | ||
folders: [ | ||
{ | ||
root: 'test/cra/static', | ||
root: 'cra/build/static', | ||
path: '/static', | ||
cache: 'immutable', | ||
}, | ||
{ | ||
root: 'test/cra', | ||
root: 'cra/build', | ||
cache: 'short', | ||
}, | ||
], | ||
index: 'test/cra/index.html', | ||
healthcheck: [ | ||
{ | ||
path: '/healthz', | ||
data: function() { | ||
return { | ||
now: new Date().toISOString(), | ||
} | ||
}, | ||
}, | ||
], | ||
envs: ['NODE_ENV', 'BASE_URL'], | ||
index: 'cra/build/index.html', | ||
csp: true, | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,8 @@ | ||
version: '3' | ||
services: | ||
web: | ||
image: fireantik/spa-prod:latest | ||
volumes: | ||
- ./cra/build:/app:ro | ||
environment: | ||
- SPA_PROD_ROOT=/app | ||
- SPA_PROD_PRESET=cra | ||
build: | ||
dockerfile: ./Dockerfile | ||
context: . | ||
ports: | ||
- '80:8080' |
Oops, something went wrong.