-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revamp dev setup to run entirely inside Docker
- Loading branch information
Showing
12 changed files
with
99 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM node:16 | ||
ARG REACT_APP_BACKEND_URL | ||
WORKDIR /frontend | ||
COPY ./package.json ./yarn.lock . | ||
RUN yarn install --ignore-scripts --frozen-lockfile | ||
CMD ["yarn", "run", "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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM rockylinux:9 | ||
|
||
RUN yum update -y && yum install -y httpd && yum clean all | ||
|
||
COPY devproxy.conf /etc/httpd/conf.d/ | ||
ENTRYPOINT ["/usr/sbin/httpd", "-DFOREGROUND"] |
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,18 @@ | ||
# | ||
# Simple Apache configuration to pretend to be Shibboleth. | ||
# | ||
|
||
ServerName localhost:5050 | ||
|
||
<VirtualHost *:80> | ||
ProxyPass / http://nginx:80/ | ||
ProxyPassReverse / http://nginx:80/ | ||
Header add utorid "utorid" | ||
RequestHeader set utorid "utorid" | ||
|
||
# for websockets (needed in prod too) | ||
RewriteEngine On | ||
RewriteCond %{HTTP:Upgrade} =websocket [NC] | ||
RewriteRule /(.*) ws://nginx:80/$1 [P,L] | ||
|
||
</VirtualHost> |
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,2 @@ | ||
REACT_APP_BACKEND_URL="http://localhost:5050" | ||
PORT=3001 |
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 @@ | ||
PORT=5001 | ||
MONGODB_URL="mongodb://mongodb:27017/quiz" | ||
FRONTEND_URL="http://localhost:5050" | ||
REDIS_URL="redis://default:password@redis:6379" | ||
WHITELIST=../whitelist |
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 @@ | ||
utorid |
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,36 @@ | ||
|
||
services: | ||
frontend: | ||
volumes: | ||
- ./client:/frontend | ||
- /frontend/node_modules | ||
- ./devproxy/env.client:/frontend/.env | ||
build: | ||
dockerfile: Dockerfile.dev | ||
env_file: | ||
- ./devproxy/env.client | ||
voteapi: | ||
volumes: | ||
- ./server:/api | ||
- /api/node_modules | ||
- ./devproxy/env.server:/api/.env | ||
- ./devproxy/whitelist:/api/whitelist | ||
build: | ||
dockerfile: Dockerfile.dev | ||
env_file: | ||
- ./devproxy/env.server | ||
devproxy: | ||
container_name: devproxy | ||
build: | ||
context: ./devproxy | ||
dockerfile: Dockerfile | ||
restart: unless-stopped | ||
ports: | ||
- "5050:80" | ||
networks: | ||
backend: | ||
aliases: | ||
- devproxy | ||
depends_on: | ||
- frontend | ||
- voteapi |
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,7 @@ | ||
services: | ||
frontend: | ||
env_file: | ||
- ./client/.env | ||
voteapi: | ||
env_file: | ||
- ./server/.env |
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,6 @@ | ||
FROM node:16 | ||
WORKDIR /api | ||
COPY ./package.json ./yarn.lock . | ||
RUN yarn install --ignore-scripts --frozen-lockfile | ||
CMD ["yarn", "run", "start"] | ||
|