Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Raphaël Courivaud <[email protected]>
  • Loading branch information
rcourivaud committed Jun 11, 2024
1 parent 2e1c797 commit d056f67
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 22 deletions.
9 changes: 2 additions & 7 deletions .docker/dagster/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,9 @@ COPY analytics/dagster/src $DAGSTER_HOME/src

WORKDIR $DAGSTER_HOME

# Setup Nginx configuration
RUN htpasswd -cb /etc/nginx/.htpasswd zlv zlv

RUN rm /etc/nginx/sites-enabled/default
ADD analytics/dagster/docker/nginx/nginx.conf /etc/nginx/sites-available/dagster
RUN ln -s /etc/nginx/sites-available/dagster /etc/nginx/sites-enabled/dagster

COPY analytics/dagster/docker/nginx/nginx.conf /etc/nginx/nginx.conf

COPY docker/nginx/nginx.conf /etc/nginx/sites-available/default

EXPOSE 8080 3000

Expand Down
12 changes: 10 additions & 2 deletions analytics/dagster/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ FROM python:3.10-slim

RUN pip install dagster-webserver dagster-postgres dagster-aws

RUN apt-get update && apt-get install -y nginx apache2-utils

RUN ls
# Install dependencies
COPY requirements.txt .
Expand All @@ -19,6 +21,12 @@ COPY src/ $DAGSTER_HOME

WORKDIR $DAGSTER_HOME

EXPOSE 3000
# Setup Nginx configuration
RUN htpasswd -cb /etc/nginx/.htpasswd zlv zlv
COPY docker/nginx/nginx.conf /etc/nginx/sites-available/default

# Expose port 80 for the Nginx web server
EXPOSE 8080

CMD nginx -g 'daemon off;' & dagster-webserver -h 0.0.0.0 -p 3000

ENTRYPOINT ["dagster-webserver", "-h", "0.0.0.0", "-p", "3000"]
22 changes: 10 additions & 12 deletions analytics/dagster/docker/nginx/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
http {
server {
listen 8080;
server {
listen 8080;

location / {
auth_basic "Restricted Access";
auth_basic_user_file /etc/nginx/.htpasswd;
location / {
auth_basic "Restricted Access";
auth_basic_user_file /etc/nginx/.htpasswd;

proxy_pass http://127.0.0.1:3000;
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://127.0.0.1:3000;
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;
}
}
2 changes: 1 addition & 1 deletion analytics/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ services:
env_file:
- .env
ports:
- 3000:3000
- 8080:8080

postgres:
image: postgres:latest
Expand Down

0 comments on commit d056f67

Please sign in to comment.