forked from mirrors/catstodon
Fixes launching of the devcontainer and adds support for Docker Desktop (#24303)
This commit is contained in:
parent
c855e1ecbc
commit
cb9cc09a6d
3 changed files with 14 additions and 2 deletions
|
@ -15,6 +15,7 @@
|
||||||
"forwardPorts": [3000, 4000],
|
"forwardPorts": [3000, 4000],
|
||||||
|
|
||||||
// Use 'postCreateCommand' to run commands after the container is created.
|
// Use 'postCreateCommand' to run commands after the container is created.
|
||||||
|
"onCreateCommand": "git config --global --add safe.directory ${containerWorkspaceFolder}",
|
||||||
"postCreateCommand": ".devcontainer/post-create.sh",
|
"postCreateCommand": ".devcontainer/post-create.sh",
|
||||||
"waitFor": "postCreateCommand",
|
"waitFor": "postCreateCommand",
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ services:
|
||||||
environment:
|
environment:
|
||||||
RAILS_ENV: development
|
RAILS_ENV: development
|
||||||
NODE_ENV: development
|
NODE_ENV: development
|
||||||
|
BIND: 0.0.0.0
|
||||||
REDIS_HOST: redis
|
REDIS_HOST: redis
|
||||||
REDIS_PORT: '6379'
|
REDIS_PORT: '6379'
|
||||||
DB_HOST: db
|
DB_HOST: db
|
||||||
|
@ -23,6 +23,10 @@ services:
|
||||||
LIBRE_TRANSLATE_ENDPOINT: http://libretranslate:5000
|
LIBRE_TRANSLATE_ENDPOINT: http://libretranslate:5000
|
||||||
# Overrides default command so things don't shut down after the process ends.
|
# Overrides default command so things don't shut down after the process ends.
|
||||||
command: sleep infinity
|
command: sleep infinity
|
||||||
|
ports:
|
||||||
|
- '127.0.0.1:3000:3000'
|
||||||
|
- '127.0.0.1:4000:4000'
|
||||||
|
- '127.0.0.1:80:3000'
|
||||||
networks:
|
networks:
|
||||||
- external_network
|
- external_network
|
||||||
- internal_network
|
- internal_network
|
||||||
|
@ -66,15 +70,19 @@ services:
|
||||||
hard: -1
|
hard: -1
|
||||||
|
|
||||||
libretranslate:
|
libretranslate:
|
||||||
image: libretranslate/libretranslate:v1.2.9
|
image: libretranslate/libretranslate:v1.3.10
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- lt-data:/home/libretranslate/.local
|
||||||
networks:
|
networks:
|
||||||
|
- external_network
|
||||||
- internal_network
|
- internal_network
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
postgres-data:
|
postgres-data:
|
||||||
redis-data:
|
redis-data:
|
||||||
es-data:
|
es-data:
|
||||||
|
lt-data:
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
external_network:
|
external_network:
|
||||||
|
|
|
@ -14,6 +14,9 @@ git checkout -- Gemfile.lock
|
||||||
# [re]create, migrate, and seed the test database
|
# [re]create, migrate, and seed the test database
|
||||||
RAILS_ENV=test ./bin/rails db:setup
|
RAILS_ENV=test ./bin/rails db:setup
|
||||||
|
|
||||||
|
# [re]create, migrate, and seed the development database
|
||||||
|
RAILS_ENV=development ./bin/rails db:setup
|
||||||
|
|
||||||
# Precompile assets for development
|
# Precompile assets for development
|
||||||
RAILS_ENV=development ./bin/rails assets:precompile
|
RAILS_ENV=development ./bin/rails assets:precompile
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue