Skip to content

Commit

Permalink
dockerization final
Browse files Browse the repository at this point in the history
  • Loading branch information
BlueHorn07 committed Sep 24, 2023
1 parent c81d2b3 commit 05601dc
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ COPY . .

RUN npm run build

EXPOSE 4000
EXPOSE 9000

CMD ["gatsby", "serve"]
32 changes: 32 additions & 0 deletions docker-stack.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
version: '3.3'
services:
dev:
image: 151345152001.dkr.ecr.ap-northeast-2.amazonaws.com/poapper-homepage:latest
ports:
- 9001:9000
logging:
driver: local
options:
max-size: 10m
deploy:
labels:
swarmpit.service.deployment.autoredeploy: 'true'
placement:
constraints:
- node.role != manager
- node.labels.application == poapper_web
prod:
image: 151345152001.dkr.ecr.ap-northeast-2.amazonaws.com/poapper-homepage:vX.X.X
ports:
- 9000:9000
logging:
driver: local
options:
max-size: 10m
deploy:
labels:
swarmpit.service.deployment.autoredeploy: 'true'
placement:
constraints:
- node.role != manager
- node.labels.application == poapper_web
2 changes: 1 addition & 1 deletion nginx/poapper-dev.nginx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ server {
client_max_body_size 10M;

location / {
proxy_pass http://localhost:6002;
proxy_pass http://localhost:9001;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
Expand Down
2 changes: 1 addition & 1 deletion nginx/poapper.nginx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ server {
client_max_body_size 10M;

location / {
proxy_pass http://localhost:4002;
proxy_pass http://localhost:9000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
Expand Down

0 comments on commit 05601dc

Please sign in to comment.