Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Dockerfile, add docker-compose for prod and dev environment, c…
…leanup some old things
- Loading branch information
1 parent
55f52d0
commit acd0237
Showing
12 changed files
with
69 additions
and
154 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,2 @@ | ||
# Игнорим данные, т.к. они не нужны для внутреннего содержимого этого контейнера | ||
data | ||
|
||
# Vendor так же не нужен | ||
vendor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,5 @@ | ||
# IDEA | ||
/.idea | ||
|
||
# Docker Compose file | ||
/docker-compose.yml | ||
/docker-compose.override.yml | ||
|
||
# vendor | ||
/vendor | ||
|
||
# Cover output | ||
.idea | ||
docker-compose.yml | ||
docker-compose.override.yml | ||
vendor | ||
.cover | ||
|
||
# Local config | ||
/config.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM alpine:3.7 | ||
|
||
EXPOSE 80 | ||
|
||
ENV STORAGE_REDIS_HOST=redis | ||
ENV STORAGE_FILESYSTEM_HOST=/data | ||
|
||
COPY docker-entrypoint.sh /usr/local/bin/ | ||
COPY release/chrly /usr/local/bin/ | ||
|
||
ENTRYPOINT ["docker-entrypoint.sh"] | ||
CMD ["serve"] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# This file can be used to start up necessary services. | ||
# Copy it into the docker-compose.yml: | ||
# > cp docker-compose.dev.yml docker-compose.yml | ||
# And then run it: | ||
# > docker-compose up -d | ||
|
||
version: '2' | ||
services: | ||
redis: | ||
image: redis:4.0-32bit | ||
ports: | ||
- "6379:6379" | ||
volumes: | ||
- ./data/redis:/data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# This file can be used to run application in the production environment. | ||
# Copy it into the docker-compose.yml: | ||
# > cp docker-compose.prod.yml docker-compose.yml | ||
# And then run it: | ||
# > docker-compose up -d | ||
# Service will be listened at the http://localhost | ||
|
||
version: '2' | ||
services: | ||
app: | ||
image: elyby/chrly | ||
hostname: chrly0 | ||
restart: always | ||
links: | ||
- redis | ||
volumes: | ||
- ./data/capes:/data/capes | ||
ports: | ||
- "80:80" | ||
environment: | ||
CHRLY_SECRET: replace_this_value_in_production | ||
|
||
redis: | ||
image: redis:4.0-32bit # 32-bit version is recommended to spare some memory | ||
restart: always | ||
volumes: | ||
- ./data/redis:/data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
if [ ! -d /data/capes ]; then | ||
mkdir -p /data/capes | ||
fi | ||
|
||
if [ "$1" = "serve" ] || [ "$1" = "token" ] || [ "$1" = "version" ]; then | ||
set -- /usr/local/bin/chrly "$@" | ||
fi | ||
|
||
exec "$@" |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.