Skip to content

Commit ea70f98

Browse files
committed
fix(nginx): routes config
1 parent 7e28e8d commit ea70f98

3 files changed

Lines changed: 15 additions & 4 deletions

File tree

‎docker-compose.yml‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,20 +36,19 @@ services:
3636
- db
3737
networks:
3838
- app-network
39-
command:
40-
[
39+
command: [
4140
"sh",
4241
"-c",
4342
"until pg_isready -h db -p 5432; do echo 'Waiting for DB...'; sleep 2;
44-
done && npx drizzle-kit migrate && npm run dev",
43+
done && npx drizzle-kit migrate && npm run dev",
4544
]
4645

4746
frontend:
4847
build:
4948
context: ./frontend
5049
container_name: integration-frontend
5150
ports:
52-
- "4000:4000"
51+
- "4000:80"
5352
networks:
5453
- app-network
5554
depends_on:

‎frontend/Dockerfile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ RUN npm run build
6262
FROM nginx:alpine AS runner
6363

6464
COPY --from=builder /app/dist /usr/share/nginx/html
65+
COPY nginx.conf /etc/nginx/conf.d/default.conf
6566

6667
EXPOSE 80
6768

‎frontend/nginx.conf‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
server {
2+
listen 80;
3+
server_name localhost;
4+
5+
root /usr/share/nginx/html;
6+
index index.html;
7+
8+
location / {
9+
try_files $uri $uri/ /index.html;
10+
}
11+
}

0 commit comments

Comments
 (0)