-
-
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.
- Loading branch information
1 parent
d88f5c6
commit 166db18
Showing
5 changed files
with
78 additions
and
6 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,19 @@ | ||
export default { | ||
services: { | ||
proxy: { | ||
depends_on: ['web'], | ||
image: 'nginx:1', | ||
ports: ['80:80'], | ||
volumes: ['./nginx:/etc/nginx/conf.d'], | ||
}, | ||
web: { | ||
command: 'bash -c "yarn --frozen-lockfile && yarn dev"', | ||
environment: ['HOST=0.0.0.0'], | ||
image: 'node:12', | ||
ports: ['3000:3000'], | ||
volumes: ['.:/app', '/app/node_modules'], | ||
working_dir: '/app', | ||
}, | ||
}, | ||
version: '3', | ||
} |
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,24 @@ | ||
import { endent } from '@dword-design/functions' | ||
import loadPkg from 'load-pkg' | ||
import parsePkgName from 'parse-pkg-name' | ||
|
||
const packageConfig = loadPkg.sync() | ||
const packageName = parsePkgName(packageConfig.name).name | ||
|
||
export default endent` | ||
upstream web { | ||
server web:3000; | ||
} | ||
server { | ||
listen 80; | ||
server_name ${packageName}.test; | ||
location / { | ||
proxy_pass http://web; | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
} | ||
} | ||
` |
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