Skip to content

Commit

Permalink
feat: update docker-compose and proxy dockerfile
Browse files Browse the repository at this point in the history
closes #44
  • Loading branch information
mari1912 committed Jul 2, 2024
1 parent 575bfcd commit 59649fb
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
16 changes: 16 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
volumes:
db-data:
runtime-data:
static-data:

networks:
public:
Expand Down Expand Up @@ -47,13 +48,28 @@ services:
- DB_DEFAULT_PASSWORD_FILE=/run/secrets/postgres_password_secret
- DB_DEFAULT_HOST=db

dashboard:
build: ./dashboard
restart: always
image: dashboard:latest

collect_static:
build: './collect_static'
image: collect_static:latest
depends_on:
- dashboard
volumes:
- static-data:/data/static

proxy:
build: ./proxy
restart: always
depends_on:
- backend
networks:
- public
volumes:
- static-data:/data/static
ports:
- target: 80
published: 80
Expand Down
2 changes: 2 additions & 0 deletions proxy/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
FROM nginx:1.27.0-alpine

VOLUME ["/data/static"]

COPY etc/ /etc/
6 changes: 5 additions & 1 deletion proxy/etc/nginx/templates/default.conf.template
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
server {
location / {
location /api {
proxy_pass ${PROXY_TARGET};
}
location /{
root /data/static;
try_files $uri /index.html;
}
}

0 comments on commit 59649fb

Please sign in to comment.