Skip to content

Commit fca0fc4

Browse files
UPDATE Nginx log config
1 parent 40093d4 commit fca0fc4

File tree

4 files changed

+15
-11
lines changed

4 files changed

+15
-11
lines changed

.github/workflows/development_pipeline.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,9 @@ jobs:
7676
id: push_images
7777
run: docker push ${{ secrets.DOCKERHUB_USERNAME }}/api_image:latest
7878

79-
79+
- name: Deploy to AWS CloudFormation
80+
uses: aws-actions/aws-cloudformation-github-deploy@v1
81+
with:
82+
name: MyStackEC2
83+
template: myStack.yaml
84+
parameter-overrides: "MyParam1=myValue,MyParam2=${{ secrets.MY_SECRET_VALUE }}"

docker-compose.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,15 @@ services:
2525

2626
nginx_service:
2727
container_name: nginx_container
28-
image: nginx_image
28+
image: nginx:1.25.1-alpine
2929
build:
3030
context: ./server
3131
dockerfile: Dockerfile
3232
ports:
33-
- 8080:80
33+
- 80:80
34+
volumes:
35+
- ./server/default.conf:/etc/nginx/conf.d/default.conf
36+
- ./server/log:/var/log/nginx
3437
depends_on:
3538
- api_service
3639
volumes:

server/Dockerfile

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,8 @@ upstream flask-api {
33
}
44

55
server {
6-
76
listen 80;
87

9-
access_log /var/log/nginx/access.log;
10-
error_log /var/log/nginx/error.log;
11-
128
location / {
139
proxy_pass http://flask-api;
1410
proxy_redirect off;
@@ -18,4 +14,8 @@ server {
1814
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
1915
proxy_set_header X-Forwarded-Proto $scheme;
2016
}
17+
18+
# Log
19+
access_log /var/log/nginx/access.log;
20+
error_log /var/log/nginx/error.log;
2121
}

0 commit comments

Comments
 (0)