1. 과정 필자는 docker-compose시 웹 애플리케이션에 env파일이 들어가는 것을 원치 않아서 어떻게 해결해야 할 지 고민이 많았다. 처음에 웹 애플리케이션에 해당하는 dockerfile 자체에서 .dockerignore 파일을 설정하여 처리하려고 하였지만 ignore가 되지 않았다. 2. 해결방안 그래서 해당 '.env'파일을 최상단으로 빼놓고 'docker-compose.yml' 와 동일한 위치에 두었다. 그 결과 웹 애플리케이션에서 '.env'파일을 무시하는데 성공하였다. -backend -entry Dockerfile uwsgi.ini -config -.env -nginx Dockerfile nginx.conf nginx-app.conf uwsgi_params docker-compose...

1. docker-compose.yml 파일 version: "3" services: nginx: container_name: nginx build: ./nginx restart: always ports: - "7070:80" volumes: - ./backend/entry:/srv/code/entry - ./log:/var/log/nginx depends_on: - web db: image: postgres container_name: main.postgres restart: always environment: POSTGRES_DATABASE: "${DB_NAME}" POSTGRES_USER: "${DB_USER}" POSTGRES_PASSWORD: "${DB_PASSWORD}" ports: - "70..
- Total
- Today
- Yesterday
- setattr
- django
- BFS
- 카카오
- docker
- 면접
- Spring
- 2021 KAKAO BLIND RECRUITMENT
- PostgreSQL
- 백준
- postgres
- headers
- Python
- Linux
- 알고리즘
- 프로그래머스
- Pattern
- Celery
- 파이썬
- docker-compose
- DRF
- env
- ubuntu
- thread
- dockerignore
- 그래프
- Command Line
- Collections
- Java
- 자바
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |