This repository has been archived by the owner on Nov 30, 2023. It is now read-only.
-
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.
Change docker config, take same as api-platform
- Loading branch information
1 parent
28d4c99
commit e86b421
Showing
50 changed files
with
1,109 additions
and
273 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
**/*.log | ||
**/*.md | ||
**/._* | ||
**/.dockerignore | ||
**/.DS_Store | ||
**/.git/ | ||
**/.gitattributes | ||
**/.gitignore | ||
**/.gitmodules | ||
**/docker-compose.*.yaml | ||
**/docker-compose.*.yml | ||
**/docker-compose.yaml | ||
**/docker-compose.yml | ||
**/Dockerfile | ||
**/Thumbs.db | ||
.next/ | ||
build/ | ||
node_modules/ | ||
.editorconfig | ||
.env.*.local | ||
.env.local |
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,42 @@ | ||
# https://docs.docker.com/develop/develop-images/multistage-build/#stop-at-a-specific-build-stage | ||
# https://docs.docker.com/compose/compose-file/#target | ||
|
||
# https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interact | ||
ARG NODE_VERSION=16 | ||
|
||
# "common" stage | ||
FROM node:${NODE_VERSION}-alpine AS app_admin_common | ||
|
||
EXPOSE 3000 | ||
|
||
WORKDIR /usr/src/admin | ||
|
||
ENV NEXT_TELEMETRY_DISABLED 1 | ||
|
||
# prevent the reinstallation of node modules at every changes in the source code | ||
COPY package.json yarn.lock ./ | ||
RUN yarn | ||
|
||
COPY . . | ||
|
||
VOLUME /usr/src/admin/node_modules | ||
|
||
# "development" stage | ||
# depends on the "common" stage above | ||
FROM app_admin_common AS app_admin_dev | ||
|
||
VOLUME /usr/src/admin/build | ||
|
||
CMD ["yarn", "start"] | ||
|
||
# "build" stage | ||
# depends on the "common" stage above | ||
FROM app_admin_common AS app_admin_prod | ||
|
||
ENV NODE_ENV production | ||
ARG NEXT_PUBLIC_ENTRYPOINT | ||
|
||
RUN set -eux; \ | ||
yarn build | ||
|
||
CMD ["yarn", "start"] |
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,2 +1,2 @@ | ||
export const API_ENTRYPOINT = 'https://localhost/api'; | ||
export const API_ENTRYPOINT = 'https://localhost'; | ||
export const ENTRYPOINT = 'https://localhost'; |
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 |
---|---|---|
|
@@ -14,9 +14,13 @@ | |
# Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2). | ||
# https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration | ||
|
||
# API Platform distribution | ||
TRUSTED_PROXIES=127.0.0.1 | ||
TRUSTED_HOSTS=^localhost$ | ||
|
||
###> symfony/framework-bundle ### | ||
APP_ENV=dev | ||
APP_SECRET=f7b55e955f22606e526aa47daba087e6 | ||
APP_SECRET=!ChangeMe! | ||
###< symfony/framework-bundle ### | ||
|
||
###> doctrine/doctrine-bundle ### | ||
|
@@ -25,7 +29,7 @@ APP_SECRET=f7b55e955f22606e526aa47daba087e6 | |
# | ||
# DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db" | ||
# DATABASE_URL="mysql://db_user:[email protected]:3306/db_name?serverVersion=5.7&charset=utf8mb4" | ||
DATABASE_URL="postgresql://symfony:[email protected]:5432/app?serverVersion=13&charset=utf8" | ||
DATABASE_URL="postgresql://symfony:[email protected]:5432/api?serverVersion=14&charset=utf8" | ||
###< doctrine/doctrine-bundle ### | ||
|
||
###> lexik/jwt-authentication-bundle ### | ||
|
@@ -82,7 +86,7 @@ USER_IN_MEMORY_HASHED_PASSWORD='USER_IN_MEMORY_HASHED_PASSWORD' | |
# The URL of the Mercure hub, used by the app to publish updates (can be a local URL) | ||
MERCURE_URL=https://example.com/.well-known/mercure | ||
# The public URL of the Mercure hub, used by the browser to connect | ||
MERCURE_PUBLIC_URL=https://example.com/.well-known/mercure | ||
MERCURE_PUBLIC_URL=https://localhost/.well-known/mercure | ||
# The secret used to sign the JWTs | ||
MERCURE_JWT_SECRET="!ChangeMe!" | ||
###< symfony/mercure-bundle ### | ||
|
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
Oops, something went wrong.