-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Use envsubst to allow frontend to find backend with env vars * Refactors docker compose file setup This structure more naturally fits what docker expects. A docker-compose file at the root, with docker files for the respective services in those modules. I have tested this locally for the prod build and pushed things and I believe it works for the other cases too. TODO: - dockerx build instructions - automating the build & versioning of images with new releases * Refactors docker compose file setup This structure more naturally fits what docker expects. A docker-compose file at the root, with docker files for the respective services in those modules. I have tested this locally for the prod build and pushed things and I believe it works for the other cases too. TODO: - dockerx build instructions - automating the build & versioning of images with new releases --------- Co-authored-by: Fran Boon <francisboon@gmail.com> Co-authored-by: Stefan Krawczyk <stefan@dagworks.io>
- Loading branch information
Showing
18 changed files
with
161 additions
and
83 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
|
||
if [[ -z $(which docker-compose) ]]; | ||
then | ||
function docker-compose() { | ||
docker compose --compatibility $@ | ||
} | ||
fi |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
|
||
. common.sh | ||
|
||
# Check if --build parameter is passed | ||
if [[ $1 == "--build" ]]; then | ||
# Run docker-compose up with project directory, verbose mode and build | ||
docker-compose --verbose -f docker-compose.yml up --build | ||
else | ||
# Run docker-compose up with project directory and verbose mode | ||
docker-compose --verbose -f docker-compose.yml up | ||
fi |
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
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,29 @@ | ||
server { | ||
listen ${NGINX_PORT}; | ||
server_name localhost; | ||
|
||
root /usr/share/nginx/html; # Common root for all files. | ||
|
||
location / { | ||
index index.html index.htm; | ||
try_files $uri $uri/ /index.html; | ||
} | ||
|
||
location ~* \.(css|js|png|jpg|jpeg|gif|ico)$ { | ||
try_files $uri $uri/ =404; | ||
} | ||
|
||
# Proxy /api requests to backend | ||
location /api { | ||
proxy_pass ${REACT_APP_API_URL}; | ||
proxy_http_version 1.1; | ||
proxy_set_header Upgrade $http_upgrade; | ||
proxy_set_header Connection 'upgrade'; | ||
proxy_set_header Host $host; | ||
proxy_cache_bypass $http_upgrade; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
proxy_read_timeout 5000; | ||
} | ||
} |
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,12 @@ | ||
#!/bin/bash | ||
|
||
. common.sh | ||
|
||
# Check if --build parameter is passed | ||
if [[ $1 == "--build" ]]; then | ||
# Run docker-compose up with project directory, verbose mode and build | ||
docker-compose --verbose -f docker-compose-prod.yml up --build | ||
else | ||
# Run docker-compose up with project directory and verbose mode | ||
docker-compose --verbose -f docker-compose-prod.yml up | ||
fi |
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,6 @@ | ||
#!/bin/bash | ||
|
||
. common.sh | ||
|
||
# Run docker-compose up with project directory and verbose mode | ||
docker-compose --verbose -f docker-compose.yml down |