Skip to content

Commit 00bc72d

Browse files
committed
Fixed docker-compose and .env.example files
1 parent 9aeb625 commit 00bc72d

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

.env.example

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Application
2+
APPLICATION_PORT=5000
3+
14
# Backend
25
BACKEND_HOST=0.0.0.0
36
BACKEND_PORT=1337
@@ -18,7 +21,7 @@ DATABASE_PASSWORD=postgres
1821
DATABASE_SSL=false
1922

2023
# Frontend
21-
PORT=3000
24+
FRONTEND_PORT=3000
2225
STRAPI_API_KEY=addyourapikeyhere
2326
NEXT_PUBLIC_STRAPI_URL=http://strapi:1337
2427
NEXT_PUBLIC_STRAPI_IMAGE_URL=http://localhost:5000/strapi

docker-compose-dev.yml

+5-4
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,14 @@ services:
2323
interval: 30s
2424
timeout: 30s
2525
retries: 5
26-
start_period: 30s
26+
start_period: 50s
2727
start_interval: 10s
2828
depends_on:
2929
- db
3030
volumes:
3131
- type: bind
3232
source: ./backend
3333
target: /app
34-
3534
env_file:
3635
- .env
3736

@@ -44,6 +43,8 @@ services:
4443
strapi:
4544
condition: service_healthy
4645
restart: true
46+
environment:
47+
- PORT=${FRONTEND_PORT}
4748
env_file:
4849
- .env
4950
volumes:
@@ -57,10 +58,10 @@ services:
5758
dockerfile: Dockerfile
5859
context: ./nginx
5960
args:
60-
- FRONTEND_PORT=${PORT}
61+
- FRONTEND_PORT=${FRONTEND_PORT}
6162
- BACKEND_PORT=${BACKEND_PORT}
6263
ports:
63-
- "3050:80"
64+
- "${APPLICATION_PORT}:80"
6465
env_file:
6566
- .env
6667
depends_on:

docker-compose.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ services:
4343
strapi:
4444
condition: service_healthy
4545
restart: true
46+
environment:
47+
- PORT=${FRONTEND_PORT}
4648
env_file:
4749
- .env
4850

@@ -52,10 +54,10 @@ services:
5254
dockerfile: Dockerfile
5355
context: ./nginx
5456
args:
55-
- FRONTEND_PORT=${PORT}
57+
- FRONTEND_PORT=${FRONTEND_PORT}
5658
- BACKEND_PORT=${BACKEND_PORT}
5759
ports:
58-
- "3050:80"
60+
- "${APPLICATION_PORT}:80"
5961
env_file:
6062
- .env
6163
depends_on:

0 commit comments

Comments
 (0)