Skip to content

Commit 484f98b

Browse files
committed
Fix and improve docker setup
1 parent dfd587c commit 484f98b

File tree

8 files changed

+16
-9
lines changed

8 files changed

+16
-9
lines changed
File renamed without changes.

.dev_to/.env-example

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
ALGOLIASEARCH_APPLICATION_ID: YOUR
2+
ALGOLIASEARCH_API_KEY: KEYS
3+
ALGOLIASEARCH_SEARCH_ONLY_KEY: HERE
File renamed without changes.
File renamed without changes.

.dockerdev/compose.yml renamed to .dev_to/compose.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ x-backend: &backend
3030
environment: &backend_environment
3131
<<: *env
3232
YARN_INTEGRITY_ENABLED: "false"
33-
ALGOLIASEARCH_APPLICATION_ID: PASTE
34-
ALGOLIASEARCH_API_KEY: YOUR
35-
ALGOLIASEARCH_SEARCH_ONLY_KEY: HERE
33+
ALGOLIASEARCH_APPLICATION_ID: ${ALGOLIASEARCH_APPLICATION_ID}
34+
ALGOLIASEARCH_API_KEY: ${ALGOLIASEARCH_API_KEY}
35+
ALGOLIASEARCH_SEARCH_ONLY_KEY: ${ALGOLIASEARCH_SEARCH_ONLY_KEY}
3636
REDIS_URL: redis://redis:6379/
3737
DATABASE_URL: postgres://postgres:postgres@postgres:5432
3838
WEBPACKER_DEV_SERVER_HOST: webpacker

.gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
# or operating system, you probably want to add a global ignore instead:
55
# git config --global core.excludesfile '~/.gitignore_global'
66

7+
# Ignore personal env variables
8+
.dev_to/.env
9+
710
# Ignore bundler config.
811
/.bundle
912
vendor/bundle
@@ -52,4 +55,4 @@ package-lock.json
5255
.idea/
5356

5457
#sitemap
55-
/public/sitemap.xml.gz
58+
/public/sitemap.xml.gz

README.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
# Setup через docker, docker-compose и dip
22

33
- gem install dip (maybe change .ruby-version file with your ruby ver)
4-
- cd .dockerdev
4+
- cd .dev_to
55
- docker-compose build
6-
- For algolia not to brake setup, paste your keys into ALGOLIASEARCH ENVs in .dockerdev/compose.yml
6+
- For algolia not to brake setup
7+
- cp .env-example .env (.env is gitignored)
8+
- in .env paste your Algolia keys
79
- dip provision
810
- docker-compose up
911
- open localhost:3000 in your browser
1012

1113
After setup you can
14+
1215
- dip bundle - to bundle install after adding gems
1316
- dip setup - to rerun bin/setup
1417
- dip bash - to do any other commands or just to peek around
1518

16-
17-
1819
# Задание №4
1920

2021
## Цели выполнения задания

dip.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ environment:
77

88
compose:
99
files:
10-
- .dockerdev/compose.yml
10+
- .dev_to/compose.yml
1111
project_name: dev_to
1212

1313
interaction:

0 commit comments

Comments
 (0)