Skip to content

Commit 2e5cca0

Browse files
Ashish KumarAshish Kumar
authored andcommitted
chore: Docker setup complete
1 parent c01635f commit 2e5cca0

File tree

9 files changed

+29
-16
lines changed

9 files changed

+29
-16
lines changed

.dockerignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
/.git
55
.gitignore
66
/env
7-
.env
7+
.env

.env

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
# add only those variables which are used in docker-compose or Dockerfile
2-
# These are the default ENV VARS for docker
3-
4-
# If you add multiple env files in docker-compose,
5-
# default variables will be override
6-
71
PORT=5000
82
TAG=latest
9-
DOCKER_USERNAME=connectashishk
10-
DOCKER_IMAGE_NAME=ssr-build-stream
3+
API_URL=https://hn.algolia.com/
4+
HOST_URL=http://localhost:5000

.env~HEAD

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# add only those variables which are used in docker-compose or Dockerfile
2+
# These are the default ENV VARS for docker
3+
4+
# If you add multiple env files in docker-compose,
5+
# default variables will be override
6+
7+
PORT=5000
8+
TAG=latest
9+
DOCKER_USERNAME=connectashishk
10+
DOCKER_IMAGE_NAME=ssr-build-stream

build.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
3+
npm ci;
4+
5+
npm run install;
6+
7+
npm rebuild node-sass;
8+
9+
npm build;
10+
11+
echo "------ Building Docker Image -------";
12+
13+
docker-compose build --no-cache

env/dev.env renamed to dev.env

File renamed without changes.

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ services:
1313
context: .
1414
dockerfile: Dockerfile
1515
args:
16-
- PORT:$PORT
16+
- PORT:$PORT

env/prod.env

Lines changed: 0 additions & 4 deletions
This file was deleted.

webpack/dev/webpack.base.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ module.exports = {
1919
new LoadablePlugin(),
2020
new CleanWebpackPlugin(),
2121
new Dotenv({
22-
path: "./env/dev.env", // load this now instead of the ones in '.env'
22+
path: "./dev.env", // load this now instead of the ones in '.env'
2323
safe: true, // load '.env.example' to verify the '.env' variables are all set. Can also be a string to a different file.
2424
systemvars: true, // load all the predefined 'process.env' variables which will trump anything local per dotenv specs.
2525
silent: true, // hide any errors

webpack/production/webpack.base.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ module.exports = {
2020
new LoadablePlugin(),
2121
new CleanWebpackPlugin(),
2222
new Dotenv({
23-
path: "./env/prod.env", // load this now instead of the ones in '.env'
23+
path: "./.env", // load this now instead of the ones in '.env'
2424
safe: true, // load '.env.example' to verify the '.env' variables are all set. Can also be a string to a different file.
2525
systemvars: true, // load all the predefined 'process.env' variables which will trump anything local per dotenv specs.
2626
silent: true, // hide any errors

0 commit comments

Comments
 (0)