Skip to content

Commit 08e8bb8

Browse files
committed
feat: use docker images + start script
1 parent 9d3918d commit 08e8bb8

File tree

3 files changed

+32
-4
lines changed

3 files changed

+32
-4
lines changed

docker-compose-build.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
version: "3.3"
2+
services:
3+
reverseproxy:
4+
build:
5+
context: ./udagram-reverseproxy
6+
image: udagram-reverseproxy:elcharitas
7+
frontend:
8+
build:
9+
context: ./udagram-frontend
10+
image: udagram-frontend:elcharitas
11+
api_user:
12+
build:
13+
context: ./udagram-api-user
14+
image: udagram-api-user:elcharitas
15+
api_feed:
16+
build:
17+
context: ./udagram-api-feed
18+
image: udagram-api-feed:elcharitas

docker-compose.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
version: "3.3"
22
services:
33
reverseproxy:
4-
build: ./udagram-reverseproxy
4+
image: udagram-reverseproxy:elcharitas
55
ports:
66
- 8080:8080
77
restart: always
88
depends_on:
99
- api-user
1010
- api-feed
1111
frontend:
12-
build: ./udagram-frontend
12+
image: udagram-frontend:elcharitas
1313
ports:
1414
- "3000:80"
1515
api-user:
16-
build: ./udagram-api-user
16+
image: udagram-api-user:elcharitas
1717
environment:
1818
URL: "http://localhost:3000"
1919
AWS_REGION: $AWS_REGION
@@ -25,7 +25,7 @@ services:
2525
POSTGRES_HOST: $POSTGRES_HOST
2626
JWT_SECRET: $JWT_SECRET
2727
api-feed:
28-
build: ./udagram-api-feed
28+
image: udagram-api-feed:elcharitas
2929
volumes:
3030
- $HOME/.aws:/root/.aws
3131
environment:

start.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# run env setup script
2+
sh ./set_env.sh;
3+
# Make sure the Docker services are running in your local machine
4+
# Remove unused and dangling images
5+
docker image prune --all
6+
# Run this command from the directory where you have the "docker-compose-build.yml" file present
7+
docker-compose -f docker-compose-build.yml build --parallel
8+
9+
# Run this command from the directory where you have the "docker-compose.yml" file present
10+
docker-compose up

0 commit comments

Comments
 (0)