-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #206 from equinor/refactor/use-nginx-as-web-server
Use NginX as web server
- Loading branch information
Showing
13 changed files
with
136 additions
and
141 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,76 +1,82 @@ | ||
version: "3.8" | ||
|
||
services: | ||
|
||
api: | ||
build: | ||
target: development | ||
image: template-api-dev | ||
volumes: | ||
- ./api/src/:/code/src | ||
env_file: | ||
- .env | ||
environment: | ||
ENVIRONMENT: local | ||
LOGGING_LEVEL: debug | ||
MONGODB_DATABASE: $MONGODB_DATABASE | ||
MONGODB_USERNAME: $MONGODB_USERNAME | ||
MONGODB_PASSWORD: $MONGODB_PASSWORD | ||
AUTH_ENABLED: $AUTH_ENABLED | ||
MONGODB_HOSTNAME: db | ||
MONGODB_PORT: $MONGODB_PORT | ||
OAUTH_TOKEN_ENDPOINT: $OAUTH_TOKEN_ENDPOINT | ||
OAUTH_AUTH_ENDPOINT: $OAUTH_AUTH_ENDPOINT | ||
OAUTH_WELL_KNOWN: $OAUTH_WELL_KNOWN | ||
OAUTH_AUDIENCE: $OAUTH_AUDIENCE | ||
OAUTH_AUTH_SCOPE: $AUTH_SCOPE | ||
OAUTH_CLIENT_ID: $CLIENT_ID | ||
SECRET_KEY: $SECRET_KEY | ||
ports: | ||
- "5000:5000" | ||
depends_on: | ||
- db | ||
links: | ||
- db | ||
|
||
web: | ||
build: | ||
target: development | ||
args: | ||
AUTH_ENABLED: $AUTH_ENABLED | ||
AUTH_SCOPE: $AUTH_SCOPE | ||
CLIENT_ID: $CLIENT_ID | ||
TENANT_ID: $TENANT_ID | ||
image: template-web-dev | ||
stdin_open: true | ||
volumes: | ||
- ./web/src:/code/src | ||
env_file: | ||
- .env | ||
environment: | ||
- NODE_ENV=development | ||
|
||
db: | ||
volumes: | ||
- database:/data/db | ||
env_file: | ||
- .env | ||
environment: | ||
MONGO_INITDB_ROOT_USERNAME: $MONGODB_USERNAME | ||
MONGO_INITDB_ROOT_PASSWORD: $MONGODB_PASSWORD | ||
|
||
volumes: | ||
database: | ||
|
||
# db-ui: | ||
# image: mongo-express:0.49 | ||
# restart: unless-stopped | ||
# ports: | ||
# - "8081:8081" | ||
# env_file: | ||
# - .env | ||
# environment: | ||
# ME_CONFIG_MONGODB_SERVER: db | ||
# ME_CONFIG_MONGODB_ADMINUSERNAME: $MONGODB_USERNAME | ||
# ME_CONFIG_MONGODB_ADMINPASSWORD: $MONGODB_PASSWORD | ||
# ME_CONFIG_MONGODB_ENABLE_ADMIN: "true" | ||
version: "3.8" | ||
|
||
services: | ||
|
||
api: | ||
build: | ||
target: development | ||
image: template-api-dev | ||
volumes: | ||
- ./api/src/:/code/src | ||
env_file: | ||
- .env | ||
environment: | ||
ENVIRONMENT: local | ||
LOGGING_LEVEL: debug | ||
MONGODB_DATABASE: $MONGODB_DATABASE | ||
MONGODB_USERNAME: $MONGODB_USERNAME | ||
MONGODB_PASSWORD: $MONGODB_PASSWORD | ||
AUTH_ENABLED: $AUTH_ENABLED | ||
MONGODB_HOSTNAME: db | ||
MONGODB_PORT: $MONGODB_PORT | ||
OAUTH_TOKEN_ENDPOINT: $OAUTH_TOKEN_ENDPOINT | ||
OAUTH_AUTH_ENDPOINT: $OAUTH_AUTH_ENDPOINT | ||
OAUTH_WELL_KNOWN: $OAUTH_WELL_KNOWN | ||
OAUTH_AUDIENCE: $OAUTH_AUDIENCE | ||
OAUTH_AUTH_SCOPE: $AUTH_SCOPE | ||
OAUTH_CLIENT_ID: $CLIENT_ID | ||
SECRET_KEY: $SECRET_KEY | ||
ports: | ||
- "5000:5000" | ||
depends_on: | ||
- db | ||
links: | ||
- db | ||
|
||
nginx: | ||
build: | ||
target: nginx-dev | ||
|
||
web: | ||
restart: unless-stopped | ||
build: | ||
target: development | ||
context: ./web | ||
args: | ||
AUTH_ENABLED: $AUTH_ENABLED | ||
AUTH_SCOPE: $AUTH_SCOPE | ||
CLIENT_ID: $CLIENT_ID | ||
TENANT_ID: $TENANT_ID | ||
image: template-web-dev | ||
stdin_open: true | ||
volumes: | ||
- ./web/src:/code/src | ||
env_file: | ||
- .env | ||
environment: | ||
- NODE_ENV=development | ||
|
||
db: | ||
volumes: | ||
- database:/data/db | ||
env_file: | ||
- .env | ||
environment: | ||
MONGO_INITDB_ROOT_USERNAME: $MONGODB_USERNAME | ||
MONGO_INITDB_ROOT_PASSWORD: $MONGODB_PASSWORD | ||
|
||
volumes: | ||
database: | ||
|
||
# db-ui: | ||
# image: mongo-express:0.49 | ||
# restart: unless-stopped | ||
# ports: | ||
# - "8081:8081" | ||
# env_file: | ||
# - .env | ||
# environment: | ||
# ME_CONFIG_MONGODB_SERVER: db | ||
# ME_CONFIG_MONGODB_ADMINUSERNAME: $MONGODB_USERNAME | ||
# ME_CONFIG_MONGODB_ADMINPASSWORD: $MONGODB_PASSWORD | ||
# ME_CONFIG_MONGODB_ENABLE_ADMIN: "true" |
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 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,5 @@ | ||
proxy_pass http://web:3000/; | ||
|
||
include /etc/nginx/config/general.conf; | ||
include /etc/nginx/config/proxy.conf; | ||
include /etc/nginx/config/websocket.conf; |
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,3 @@ | ||
root /data/www/; | ||
include /etc/nginx/config/general.conf; | ||
include /etc/nginx/config/websocket.conf; |
File renamed without changes.
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