forked from plankanban/planka
-
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.
feat: Development environment with docker compose (plankanban#709)
- Loading branch information
1 parent
a8557a3
commit 05e0dfd
Showing
4 changed files
with
157 additions
and
33 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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FROM node:18-alpine as server-dependencies | ||
|
||
RUN apk -U upgrade \ | ||
&& apk add build-base python3 \ | ||
--no-cache | ||
|
||
WORKDIR /app/client | ||
COPY package.json package-lock.json /app/client/ | ||
RUN npm install npm@latest --global \ | ||
&& npm install pnpm --global \ | ||
&& pnpm import \ | ||
&& pnpm install | ||
|
||
|
||
WORKDIR /app/ | ||
COPY ../../package.json ../../package-lock.json /app/ | ||
RUN pnpm import \ | ||
&& pnpm install |
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,14 @@ | ||
FROM node:18-alpine as server-dependencies | ||
|
||
RUN apk -U upgrade \ | ||
&& apk add build-base python3 \ | ||
--no-cache | ||
|
||
WORKDIR /app | ||
|
||
COPY package.json package-lock.json ./ | ||
|
||
RUN npm install npm@latest --global \ | ||
&& npm install pnpm --global \ | ||
&& pnpm import \ | ||
&& pnpm install |
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,47 @@ | ||
user nginx; | ||
worker_processes 1; | ||
|
||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
http { | ||
include /etc/nginx/mime.types; | ||
default_type application/octet-stream; | ||
|
||
sendfile on; | ||
keepalive_timeout 65; | ||
|
||
server { | ||
listen 80; | ||
|
||
location /api/ { | ||
proxy_pass http://server:1337; | ||
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; | ||
} | ||
|
||
location /socket.io { | ||
proxy_set_header Upgrade $http_upgrade; | ||
proxy_set_header Connection "upgrade"; | ||
proxy_http_version 1.1; | ||
proxy_set_header Host $host; | ||
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_pass http://server:1337/socket.io; | ||
} | ||
|
||
location / { | ||
proxy_pass http://client:3000; | ||
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; | ||
} | ||
} | ||
} |
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