-
Notifications
You must be signed in to change notification settings - Fork 561
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding docker file for PyCharm docker interpreter, adding docs
- Loading branch information
1 parent
4029cb2
commit c3f1097
Showing
6 changed files
with
80 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
FROM ubuntu:bionic | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
# Ralph configuration and paths | ||
ARG RALPH_LOCAL_DIR="/var/local/ralph" | ||
ARG RALPH_VERSION="" | ||
ARG SNAPSHOT="0" | ||
ENV PATH=/opt/ralph/ralph-core/bin/:$PATH | ||
ENV RALPH_CONF_DIR="/etc/ralph" | ||
ENV RALPH_LOCAL_DIR="$RALPH_LOCAL_DIR" | ||
ENV RALPH_IMAGE_TMP_DIR="/tmp" | ||
|
||
LABEL maintainer="Allegro.pl Sp. z o.o. [email protected]" | ||
LABEL authors="Allegro.pl Sp. z o.o. and Contributors [email protected]" | ||
LABEL description="Advanced Asset Management and DCIM system for data center and back office." | ||
LABEL version="$RALPH_VERSION" | ||
|
||
RUN echo 'Acquire::Retries "5";' > /etc/apt/apt.conf.d/80-retries | ||
|
||
RUN apt-get clean && \ | ||
apt-get update && \ | ||
apt-get -y install --no-install-recommends ca-certificates | ||
|
||
RUN sed 's@http://archive.ubuntu.com@https://ftp.uni-mainz.de/ubuntu@' -i /etc/apt/sources.list | ||
|
||
RUN apt-get clean && \ | ||
apt-get update && \ | ||
apt-get -y install \ | ||
apt-transport-https gnupg2 locales curl \ | ||
python3 python3-dev python3-pip python3-setuptools git libldap2-dev libsasl2-dev \ | ||
libffi-dev nodejs npm \ | ||
libmysqlclient-dev=5.7.21-1ubuntu1 libmysqlclient20=5.7.21-1ubuntu1 && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# set UTF-8 locale | ||
RUN locale-gen en_US.UTF-8 | ||
ENV LANG en_US.UTF-8 | ||
ENV LANGUAGE en_US:en | ||
ENV LC_ALL en_US.UTF-8 | ||
|
||
RUN mkdir -p $RALPH_LOCAL_DIR | ||
COPY . $RALPH_LOCAL_DIR | ||
WORKDIR $RALPH_LOCAL_DIR | ||
RUN pip3 install -r $RALPH_LOCAL_DIR/requirements/dev.txt |
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,34 @@ | ||
# Ralph development environment | ||
|
||
## Requirements | ||
|
||
Make sure your host has the following requirements installed and | ||
properly configured, if required: | ||
|
||
1. Docker 24.0.0 or later | ||
1. docker-compose | ||
|
||
## Setting up Ralph in PyCharm IDE | ||
|
||
From **Settings... -> Project: ralph -> Project Interpreters** choose **Add Interpreter -> On Docker** | ||
|
||
Choose docker/Dockerfile-local-interpreter as Dockerfile and change context to "." | ||
|
||
If you are using non amd64 architecture (ie. Apple Silicon), under Options -> Build options: add ```--platform linux/amd64```. Keep in mind, that this requires amd64 emulation in your docker environment. | ||
|
||
 | ||
|
||
After clicking Next, image should be successfully created and next step should provide you with proper path to interpreter: | ||
|
||
 | ||
|
||
Properly created environment should show all packages required by Ralph: | ||
|
||
 | ||
|
||
## Running local instance of Ralph from source code | ||
|
||
To run local Ralph from source code using docker-compose issue this command: | ||
```docker-compose -f docker/docker-compose-local-dev.yml up``` | ||
|
||
All required services should be started and your local ralph instance should be accessible on http://localhost:8000 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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